Skip to content

Commit 1ae8c88

Browse files
authored
Merge pull request #208 from taleodor/2025-11-new-flow-docs-update
Update documentation based on the latest TEA flow
2 parents 20e1d8f + ed1a4af commit 1ae8c88

File tree

2 files changed

+69
-81
lines changed

2 files changed

+69
-81
lines changed

api-flow/consumer.md

Lines changed: 56 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -6,69 +6,66 @@ described in the [discovery document](/discovery/readme.md).
66

77
## API usage
88

9-
The standard TEI points to a product. A product is something sold, downloaded as an opensource project or aquired
10-
by other means. It contains one or multiple components.
11-
12-
- __List of TEA Components__: Components are components of something that is part of a product.
13-
Each Component has it's own versioning and it's own set of artifacts.
14-
- __List of TEA Releases__: Each component has a list of releases where each release has a timestamp and
15-
a lifecycle enumeration. They are normally sorted by timestamps. The TEA API has no requirements of
16-
type of version string (semantic or any other scheme) - it's just an identifier set by the manufacturer.
9+
The standard TEI points to a product release. A product release is something sold, downloaded as an opensource project or aquired by other means. It contains one or multiple component releases.
10+
11+
- __List of TEA Component Rleases__: Component releases are components of a product release.
12+
Each Component release has its own versioning and its own set of artefacts, they have a timestamp and a lifecycle enumeration. They are normally sorted by timestamps. The TEA API has no requirements of type of version string (semantic or any other scheme) - it's just an identifier set by the manufacturer.
1713
- __List of TEA Collections__: For each release, there is a list of TEA collections as indicated
1814
by release date and a version integer starting with collection version 1.
19-
- __List of TEA Artifacts__: The collection is unique for a version and contains a list of artifacts.
20-
This can be SBOM files, VEX, SCITT, IN-TOTO or other documents. Note that a single artifact
21-
can belong to multiple versionsof a Component and multiple Components.
22-
- __List of artifact formats__: An artifact can be published in multiple formats.
15+
- __List of TEA Artifacts__: The collection is unique for a version and contains a list of artefacts.
16+
This can be SBOM files, VEX, SCITT, IN-TOTO or other documents. Note that a single artefact
17+
can belong to multiple Component or Product Releases.
18+
- __List of artefact formats__: An artefact can be published in multiple formats.
2319

24-
The user has to know product TEI and version of each component (TEA Component) to find the list of
25-
artifacts for the used version.
20+
The user has to know product release TEI and in some cases version of each component (TEA
21+
Component Release) to find the list of artefacts for the particular Product Release.
2622

2723
## API flow based on TEI discovery
2824

2925
```mermaid
3026
3127
---
32-
title: TEA consumer
28+
title: TEA consumer flow
3329
---
34-
3530
sequenceDiagram
3631
autonumber
37-
actor user
38-
participant discovery as TEA Discovery with TEI
39-
40-
participant tea_product as TEA Product
41-
participant tea_component as TEA Component
42-
participant tea_release as TEA Release
43-
participant tea_collection as TEA Collection
44-
participant tea_artifact as TEA Artefact
32+
actor manufacturer as Manufacturer
33+
actor user as TEA Client
4534
35+
participant discovery as TEA Discovery / TEA Server
36+
participant tea_product_release as TEA Product Release
37+
participant tea_component_release as TEA Component Release
4638
47-
user ->> discovery: Discovery using DNS
48-
discovery ->> user: List of API servers
39+
manufacturer ->> user: Provides TEI (Transparency Exchange Identifier)
4940
50-
user ->> tea_product: Finding all product parts (TEA Components) and facts about the product
51-
tea_product ->> user: List of product parts
41+
user ->> discovery: GET https://<domain>/.well-known/tea
42+
discovery -->> user: TEA discovery document (API servers & endpoints)
5243
53-
user ->> tea_component: Finding information of a component
54-
tea_component ->> user: List of component metadata
44+
user ->> discovery: Call Discovery endpoint with TEI
45+
discovery -->> user: Product Release reference(s)
5546
56-
user ->> tea_release: Finding a specific version/release
57-
tea_release ->> user: List of releases and collection id for each release
58-
59-
user ->> tea_collection: Finding all artefacts for version in scope
60-
tea_collection ->> user: List of artefacts and formats available for each artefact
61-
62-
user ->> tea_artifact: Request to download artifact
63-
tea_artifact ->> user: Artifact
47+
alt Multiple Product Releases returned
48+
user ->> tea_product_release: Resolve Product Release(s)
49+
tea_product_release -->> user: List of Component Releases
50+
user ->> user: Identify Discriminating Component Releases
51+
user ->> tea_component_release: Resolve Discriminating Component Releases
52+
tea_component_release -->> user: Discriminating Component Release Details
53+
user ->> user: Converge on a Single Product Release
54+
end
6455
56+
user ->> tea_product_release: Resolve Product Release Details
57+
tea_product_release -->> user: List of Component Releases
6558
59+
loop For each tea_component_release
60+
user ->> tea_component_release: Obtain latest collections
61+
tea_component_release -->> user: List of TEA Artifacts
62+
end
6663
6764
```
6865

6966
## API flow based on direct access to API
7067

71-
In this case, the client wants to search for a specific product using the API
68+
In this case, the client wants to search for a specific product release using the API
7269

7370
```mermaid
7471
@@ -80,30 +77,26 @@ sequenceDiagram
8077
autonumber
8178
actor user
8279
83-
participant tea_product as TEA Product
84-
participant tea_component as TEA Component
85-
participant tea_release as TEA Release
80+
participant tea_product_release as TEA Product Release
81+
participant tea_component_release as TEA Component Release
8682
participant tea_collection as TEA Collection
87-
participant tea_artifact as TEA Artefact
83+
participant tea_artifact as TEA Artifact
8884
8985
90-
user ->> tea_product: Search for product based on identifier (CPE, PURL, name)
91-
tea_product ->> user: List of products
86+
user ->> tea_product_release: Search for product releases based on identifier (CPE, PURL, name)
87+
tea_product_release ->> user: List of product releases
9288
93-
user ->> tea_product: Finding all product parts (TEA Components) and facts about choosen product
94-
tea_product ->> user: List of product parts
89+
user ->> tea_product_release: Finding all product parts (TEA Component Releases) and facts about choosen product
90+
tea_product_release ->> user: List of TEA Component Releases
9591
96-
user ->> tea_component: Finding information of a component
97-
tea_component ->> user: List of component metadata
92+
user ->> tea_component_release: Finding information of a component release
93+
tea_component_release ->> user: List of releases and collection id for each release
9894
99-
user ->> tea_release: Finding a specific version/release
100-
tea_release ->> user: List of releases and collection id for each release
101-
102-
user ->> tea_collection: Finding all artefacts for version in scope
103-
tea_collection ->> user: List of artefacts and formats available for each artefact
95+
user ->> tea_collection: Finding all TEA Artifacts for TEA Component Release
96+
tea_collection ->> user: List of TEA Artifacts and formats available for each TEA Artifact
10497
105-
user ->> tea_artifact: Request to download artifact
106-
tea_artifact ->> user: Artifact
98+
user ->> tea_artifact: Request to download TEA artifact
99+
tea_artifact ->> user: TEA Artifact
107100
108101
```
109102

@@ -123,22 +116,22 @@ sequenceDiagram
123116
autonumber
124117
actor user
125118
126-
participant tea_product as TEA Product
127119
participant tea_component as TEA Component
128-
participant tea_release as TEA Release
129-
participant tea_collection as TEA Collection
130-
participant tea_artifact as TEA Artefact
120+
participant tea_component_release as TEA Component Release
121+
122+
user ->> tea_component: Finding a specific version/release
123+
tea_component ->> user: List of releases and collection id for each release
131124
132-
user ->> tea_release: Finding a specific version/release
133-
tea_release ->> user: List of releases and collection id for each release
125+
user ->> tea_component_release: Details for discovered release
126+
tea_component_release ->> user: Collection with artefact details for the release
134127
135128
```
136129

137130
## API flow based on cached data - checking if a collection changed
138131

139132
In this case a TEA client knows the release UUID, the collection UUID, and the
140133
collection version from previous queries. If the given version is not the same,
141-
another query is done to get reason for update and new collection list of artifacts.
134+
another query is done to get reason for update and new collection list of artefacts.
142135

143136

144137
```mermaid
@@ -151,11 +144,7 @@ sequenceDiagram
151144
autonumber
152145
actor user
153146
154-
participant tea_product as TEA Product
155-
participant tea_component as TEA Component
156-
participant tea_release as TEA Release
157147
participant tea_collection as TEA Collection
158-
participant tea_artifact as TEA Artefact
159148
160149
161150
user ->> tea_collection: Finding the current collection, including version

discovery/readme.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414

1515
## From product identifier to API endpoint
1616

17-
TEA Discovery is the connection between a product identifier and the API endpoint.
18-
A "product" is something that the customer aquires or downloads - hardware and/or software.
17+
TEA Discovery is the connection between a product release identifier and the API endpoint.
18+
A "product release" is something that the customer aquires or downloads - hardware and/or software.
1919

2020
It can be a bundle of many digital devices or software applications.
21-
A "product" normally also has an entry in a large corporation's asset inventory system.
21+
A "product release" normally also has an entry in a large corporation's asset inventory system.
2222

23-
A product identifier is embedded in a URN where the identifier is one of many existing
23+
A product release identifier is embedded in a URN where the identifier is one of many existing
2424
identifiers or a random string - like an EAN or UPC bar code, UUID, product
2525
number or PURL.
2626

2727
The goal is for a user to add this URN to the transparency platform (sometimes with an
28-
associated authentication token) and have the platform access the required artifacts
28+
associated authentication token) and have the platform access the required artefacts
2929
in a highly automated fashion.
3030

3131
## Advertising the TEI
3232

33-
The TEI for a product can be communicated to the user in many ways.
33+
The TEI for a product release can be communicated to the user in many ways.
3434

3535
- A QR code on a box
3636
- On the invoice or delivery note
@@ -41,16 +41,16 @@ is defined by the manufacturer and can normally not be derived from known inform
4141

4242
## TEA Discovery - defining an extensible identifier
4343

44-
TEA discovery is the process where a user with a product identifier can discover and download
45-
artifacts automatically, with or without authentication. A globally unique identifier is
46-
required for a given product. This identifier is called the Transparency Exchange Identifier (TEI).
44+
TEA discovery is the process where a user with a product release identifier can discover and download
45+
artefacts automatically, with or without authentication. A globally unique identifier is
46+
required for a given product release. This identifier is called the Transparency Exchange Identifier (TEI).
4747

4848
The TEI identifier is based on DNS, which assures a uniqueness per vendor (or open source project)
49-
and gives the vendor a name space to define product identifiers based on existing or new identifiers
50-
like EAN/UPC bar code, PURLs or other existing schemes. A given product may have multiple identifiers
49+
and gives the vendor a namespace to define product release identifiers based on existing or new identifiers
50+
like EAN/UPC bar code, PURLs or other existing schemes. A given product release may have multiple identifiers
5151
as long as they all resolve into the same destination.
5252

53-
The vendor needs to make sure that the TEI is unique within the vendor's name space. There is no
53+
The vendor needs to make sure that the TEI is unique within the vendor's namespace. There is no
5454
intention to create any TEI registries.
5555

5656
## The TEI URN: An extensible identifier
@@ -60,9 +60,8 @@ identifiers like EAN codes, PURL and other identifiers. It is based on a DNS nam
6060
to global uniqueness without new registries.
6161

6262
The TEI can be shown in the software itself, in shipping documentation, in web pages and app stores.
63-
TEI is unique for a product, not a version of a product.
6463

65-
A TEI belongs to a single product. A product can have multiple TEIs - like one with a EAN/UPC
64+
A TEI belongs to a single product release. A product release can have multiple TEIs - like one with a EAN/UPC
6665
barcode and one with the vendor's product number.
6766

6867
### TEI syntax

0 commit comments

Comments
 (0)