Skip to content

Commit 1c1c949

Browse files
authored
Merge pull request #68 from madpah/patch/dns-record-update-to-svcb
Updated Discovery to cater for move to SVCB DNS records
2 parents cbcf41b + 38fb859 commit 1c1c949

File tree

1 file changed

+46
-25
lines changed

1 file changed

+46
-25
lines changed

discovery/readme.md

+46-25
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
**NOTE**: _This is a proposal for the WG_
44

5+
- [From product identifier to API endpoint](#from-product-identifier-to-api-endpoint)
6+
- [TEA Discovery - defining an extensible identifier](#tea-discovery---defining-an-extensible-identifier)
7+
- [The TEI URN: An extensible identifier](#the-tei-urn-an-extensible-identifier)
8+
- [TEI syntax](#tei-syntax)
9+
- [TEI types](#tei-types)
10+
- [TEI resolution using DNS](#tei-resolution-using-dns)
11+
- [Finding the Index using DNS result](#finding-the-index-using-dns-result)
12+
- [The TEA Version Index](#the-tea-version-index)
13+
- [References](#references)
14+
15+
516
## From product identifier to API endpoint
617

718
TEA Discovery is the connection between a product identifier and the API endpoint.
@@ -19,11 +30,8 @@ TEA discovery is the process where a user with a product identifier can discover
1930
artifacts automatically, with or without authentication. A globally unique identifier is
2031
required for a given product. This identifier is called the Transparency Exchange Identifier (TEI).
2132

22-
The TEI identifier is based on DNS, which assures a
23-
uniqueness per vendor (or open source project) and gives the vendor a name space to
24-
define product identifiers based on existing or new identifiers like EAN bar code,
25-
PURLs or other existing schemes. A given product may have multiple identifiers as long as
26-
they all resolve into the same destination.
33+
The TEI identifier is based on DNS, which assures a uniqueness per vendor (or open source project)
34+
and gives the vendor a name space to define product identifiers based on existing or new identifiers like EAN bar code, PURLs or other existing schemes. A given product may have multiple identifiers as long as they all resolve into the same destination.
2735

2836
## The TEI URN: An extensible identifier
2937

@@ -34,70 +42,82 @@ to global uniqueness without new registries.
3442
The TEI can be shown in the software itself, in shipping documentation, in web pages and app stores.
3543
TEI is unique for a product, not a version of a software. The TEI consist of three core parts
3644

37-
- The **type** which defines the syntax of the unique identifier part
38-
- The **domain name** part does not have to exist as a web server (HTTPS).
39-
- The uniqueness of the name is the domain name part that has to be registred at creation of the TEI.
40-
- The **unique identifier** has to be unique within the domain. Recommendation is to use UUID,
41-
but it can be an existing article code too.
45+
- The **`type`** which defines the syntax of the unique identifier part
46+
- The **`domain-name`** part does not have to exist as a web server (HTTPS), but may do
47+
- The uniqueness of the name is the domain name part that has to be registred at creation of the TEI.
48+
- The **`unique-identifier`** has to be unique within the `domain-name`. Recommendation is to use a UUID but it can be an existing article code too
4249

4350
A TEI belongs to a single product. A product can have multiple TEIs - like one with a EAN
44-
bar code and one with the vendor's product number.
51+
barcode and one with the vendor's product number.
4552

4653
### TEI syntax
4754

48-
4955
```
50-
urn:tei:<type>:<domain>:<data>
56+
urn:tei:<type>:<domain-name>:<unique-identifier>
5157
````
5258
53-
**Note**: this requires a registration of the TEI URN schema with IANA.
59+
**Note**: this requires a registration of the TEI URN schema with IANA - [see here](https://github.com/CycloneDX/transparency-exchange-api/issues/18)
5460
55-
### TEI examples
61+
### TEI types
5662
57-
- `urn:tei:uuid:` for a company specific name and product identifier as UUID
58-
- Example: `urn:tei:uuid:products.example.com:d4d9f54a-abcf-11ee-ac79-1a52914d44b1`
59-
- Syntax: `urn:tei:uuid:<name based on domain>:<unique identifier>`
63+
The below show examples of TEI where the types are specific known formats or types.
6064
61-
### TEI types
65+
Reminder: the `unique-identifer` component of the TEI needs only be unique within the `domain-name`.
6266
6367
#### PURL - Package URL
6468
69+
Where the `unique-identifier` is a PURL in it's canonical string form.
70+
6571
Syntax:
6672
6773
```text
68-
urn:tei:purl:<domain or host>:<purl>
74+
urn:tei:purl:<domain-name>:<purl>
6975
````
7076
77+
Example:
78+
```text
79+
urn:tei:org.cyclonedx:pkg:pypi/cyclonedx-python-lib@8.4.0?extension=whl&qualifier=py3-none-any
80+
```
81+
7182
#### SWID
7283

84+
Where the `unique-identifier` is a SWID.
85+
7386
Syntax:
7487

7588
```text
76-
urn:tei:swid:<domain or host>:<swid>
89+
urn:tei:swid:<domain-name>:<swid>
7790
````
7891
7992
Note that there is a TEI SWID type as well as a PURL SWID type.
8093
8194
#### HASH
8295
83-
Supports the following hash values:
96+
Where the `unique-identifier` is a Hash. Supports the following hash types:
8497
8598
* SHA256
8699
* SHA384
87100
* SHA512
88101
89102
```text
90-
urn:tei:hash:<domain or host>:<hashtype>:<hash>
103+
urn:tei:hash:<domain-name>:<hashtype>:<hash>
91104
````
92105
106+
Example:
107+
```text
108+
urn:tei:cyclonedx.org:SHA256:fd44efd601f651c8865acf0dfeacb0df19a2b50ec69ead0262096fd2f67197b9
109+
```
110+
93111
The origin of the hash is up to the vendor to define.
94112

95113
#### UUID
96114

115+
Where the `unique-identifier` is a UUID.
116+
97117
Syntax:
98118

99119
```text
100-
urn:tei:uuid:<domain or host>:<uuid>
120+
urn:tei:uuid:<domain-name>:<uuid>
101121
````
102122
103123
Has to be a valid UUID.
@@ -108,6 +128,7 @@ Has to be a valid UUID.
108128
- GS1
109129
- STD
110130
131+
111132
### TEI resolution using DNS
112133
113134
The name part of the TEI is used in a DNS query to find one or multiple locations for product transparency exchange information.
@@ -146,7 +167,7 @@ Append the product part of the TEI to the URI found
146167
147168
- TEI: `urn:tei:uuid:products.example.com:d4d9f54a-abcf-11ee-ac79-1a52914d44b1`
148169
- DNS record: `_tei._tcp.products.example.com`
149-
- URI in DNS: `https://www.example.com/transparency/`
170+
- URI in DNS: `://www.example.com/transparency/`
150171
- URL: `https://www.example.com/transparency/d4d9f54a-abcf-11ee-ac79-1a52914d44b1/`
151172
152173
If no DNS URI records are found the resolution defaults to A and AAAA records.

0 commit comments

Comments
 (0)