@@ -37,7 +37,7 @@ The TEI for a product can be communicated to the user in many ways.
37
37
38
38
## TEA Discovery - defining an extensible identifier
39
39
40
- TEA discovery is the process where a user with a product identifier can discover and downloadg
40
+ TEA discovery is the process where a user with a product identifier can discover and download
41
41
artifacts automatically, with or without authentication. A globally unique identifier is
42
42
required for a given product. This identifier is called the Transparency Exchange Identifier (TEI).
43
43
@@ -65,7 +65,7 @@ urn:tei:<type>:<domain-name>:<unique-identifier>
65
65
````
66
66
67
67
- The **`type`** which defines the syntax of the unique identifier part
68
- - The **`domain-name`** part does not have to exist as a web server (HTTPS), but may do
68
+ - The **`domain-name`** part resolves into a web server, which may not be the API host.
69
69
- The uniqueness of the name is the domain name part that has to be registred at creation of the TEI.
70
70
- The **`unique-identifier`** has to be unique within the `domain-name`.
71
71
Recommendation is to use a UUID but it can be an existing article code too
@@ -89,6 +89,7 @@ urn:tei:purl:<domain-name>:<purl>
89
89
````
90
90
91
91
Example:
92
+
92
93
```text
93
94
urn:tei:purl:cyclonedx.org:pkg:pypi/cyclonedx-python-lib@8.4.0?extension=whl&qualifier=py3-none-any
94
95
```
@@ -109,9 +110,9 @@ Note that there is a TEI SWID type as well as a PURL SWID type.
109
110
110
111
Where the `unique-identifier` is a Hash. Supports the following hash types:
111
112
112
- * SHA256
113
- * SHA384
114
- * SHA512
113
+ - SHA256
114
+ - SHA384
115
+ - SHA512
115
116
116
117
```text
117
118
urn:tei:hash:<domain-name>:<hashtype>:<hash>
@@ -149,53 +150,25 @@ urn:tei:uuid:cyclonedx.org:d4d9f54a-abcf-11ee-ac79-1a52914d44b1
149
150
### TEI resolution using DNS
150
151
151
152
The ` domain-name ` part of the TEI is used in a DNS query to find one or multiple locations for
152
- product transparency exchange information. DNS can deliver load balancing and
153
- failover functionality to make sure that the information is always reachable.
153
+ product transparency exchange information.
154
154
155
- At the URL we need a well-known name space to find out where the API endpoint is hosted.
155
+ At the URL a well-known name space is used to find out where the API endpoint is hosted.
156
156
This is solved by using the ".well-known" name space as defined by the IETF.
157
157
158
158
- ` urn:tei:uuid:products.example.com:d4d9f54a-abcf-11ee-ac79-1a52914d44b1 `
159
159
- Syntax: ` urn:tei:uuid:<name based on domain>:<unique identifier> `
160
160
161
161
The name in the DNS name part points to a set of DNS records.
162
162
163
- A TEI with name ` tea.example.com ` queries for ` tea.example.com ` ` HTTPS ` records.
163
+ A TEI with name ` tea.example.com ` queries for ` tea.example.com ` ` A ` and ` AAAA ` records.
164
164
These point to the hosts available for the Transparency Exchange API.
165
- Note that ` tea.example.com ` may not have ` A ` /` AAAA ` records at all if it
166
- points to other servers, like ` tea01.example.org ` and ` teahost.example.net ` .
167
-
168
- If there are no HTTPS records, try to resolve the name (using ` AAAA ` and ` A ` DNS records).
169
165
170
- After selecting a host and resolving that to IP address, the TEA client
171
- connects to the host using HTTPS with the original name, not the one found
172
- in DNS. The URI is composed of the name with the ` /.well-known/tea ` prefix added.
173
-
174
- ``` zone_file
175
- tea.example.com. 3600 IN HTTPS 1 tea01.prod.example.com.
176
- ```
166
+ The TEA client connects to the host using HTTPS and validates the certificate.
167
+ The URI is composed of the name with the ` /.well-known/tea ` prefix added.
177
168
178
- Results in the base URI (without the product identifier)
179
- ` https://tea.example.com/.well-known/tea/ ` while connecting to
180
- the host ` tea01.prod.example.com ` .
169
+ This results in the base URI (without the product identifier)
170
+ ` https://tea.example.com/.well-known/tea/ `
181
171
182
- Results in ` https://tea.example.com/.well-known/tea/<identifier> ` while connecting to
183
- the host tea01.prod.example.com.
184
-
185
- ### Load balancing and fail over
186
-
187
- Example zone:
188
-
189
- ``` text
190
- tea.example.com. 3600 IN HTTPS 10 tea01.prod.example.com.
191
- tea.example.com. 3600 IN HTTPS 10 tea02.prod.example.com.
192
- tea.example.com. 3600 IN HTTPS 20 tea03.prod.example.com.
193
- ```
194
-
195
- In this case servers tea01 and tea02 will get 50% of the load each.
196
- If they are not reachable, tea03 will be used for failover.
197
-
198
- It is recommended to have a third party external repository as the last priority.
199
172
200
173
## Connecting to the API
201
174
@@ -215,18 +188,9 @@ Append the product part of the TEI to the URI found
215
188
216
189
- TEI: ` urn:tei:uuid:products.example.com:d4d9f54a-abcf-11ee-ac79-1a52914d44b1 `
217
190
- DNS record: ` products.example.com `
218
- - Server found in DNS ` HTTPS ` record: ` teapot.prod.example.com `
219
191
- URL: ` https://products.example.com/.well-known/tea/d4d9f54a-abcf-11ee-ac79-1a52914d44b1/ `
220
192
- HTTP 302 redirect to "https://teapot02.consumer.example.com/tea/v2/product-index/d4d9f54a-abcf-11ee-ac79-1a52914d44b1 '
221
193
222
- The server at ` teapot.prod.example.com ` needs a TLS certificate that valid for ` products.example.com `
223
- - e.g. with ` products.example.com ` in the subject alt name. ` teapot02.consumer.example.com ` needs a certificate with that
224
- host name.
225
-
226
- If no ` HTTPS ` records are found the resolution defaults to ` A ` and ` AAAA ` records.
227
- IP address is not valid in the domain name field.
228
-
229
- Append the URL prefix ` /.well-known/tea/ ` of the TEI to the DNS name found
230
194
Always prefix with the https:// scheme. http (unencrypted) is not valid.
231
195
232
196
- TEI: ` urn:tei:uuid:products.example.com:d4d9f54a-abcf-11ee-ac79-1a52914d44b1 `
@@ -242,6 +206,5 @@ has many identifiers. The redirect should not lead to a separate web server.
242
206
243
207
## References
244
208
245
- - [ RFC 9640 - Service Binding and Parameter Specification via the DNS (SVCB and HTTPS Resource Records)] ( https://datatracker.ietf.org/doc/html/rfc9640 )
246
209
- [ IANA .well-known registry] ( https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml )
247
210
- [ IANA URI registry] ( https://www.iana.org/assignments/urn-namespaces/urn-namespaces.xhtml#urn-namespaces-1 )
0 commit comments