Skip to content

Commit 423a898

Browse files
authored
Merge pull request #120 from oej/from-leaf-to-component
Renaming TEA LEAF to TEA COMPONENT
2 parents 36374b5 + 3c6d351 commit 423a898

File tree

5 files changed

+46
-36
lines changed

5 files changed

+46
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The working group has produced a list of use cases and requirements for the prot
4040
## Data model
4141

4242
- [TEA Product index](tea-index/tea-index.md): This is the starting point. A "product" is something for sale. The [Transparency Exchange Identifier, TEI](/discovery/readme.md) points to a single product.
43-
- [TEA Leaf index](tea-leaf/tea-leaf.md): A leaf is a version entry. The leaf index has one entry per version of the product.
43+
- [TEA Component index](tea-component/tea-component.md): A Component index is a version entry. The Component version index has one entry per version of the product.
4444
- [TEA Collection](tea-collection/tea-collection.md): The collection is a list of artefacts for a specific version. The collection can be dynamic or static, depending on the implemenation.
4545

4646
## Artefacts available of the API

api-flow/consumer.md

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

99
The standard TEI points to a product.
1010

11-
- __List of TEA leafs__: Leafs are components of something sold. Each leaf has it's own versioning and it's own set of artefacts. Note that a single artefact can belong to multiple versions of a leaf and multiple leafs.
12-
- __List of TEA collections__: For each leaf, there is a list of TEA collections as indicated by release date and a version string. 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. It's sorted by release date as a default.
11+
- __List of TEA Components__: Components are components of something sold. Each Component has it's own versioning and it's own set of artefacts. Note that a single artefact can belong to multiple versions of a Component and multiple Components.
12+
- __List of TEA collections__: For each Component, there is a list of TEA collections as indicated by release date and a version string. 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. It's sorted by release date as a default.
1313
- __List of TEA artefacts__: The collection is unique for a version and contains a list of artefacts. This can be SBOM files, VEX, SCITT, IN-TOTO or other documents.
1414
- __List of artefact formats__: An artefact can be published in multiple formats.
1515

16-
The user has to know product TEI and version of each component (TEA LEAF) to find the list of artefacts for the used version.
16+
The user has to know product TEI and version of each component (TEA Component) to find the list of artefacts for the used version.
1717

1818
## API flow
1919

@@ -29,7 +29,7 @@ sequenceDiagram
2929
participant discovery as TEA Discovery with TEI
3030
3131
participant tea_product as TEA Product
32-
participant tea_leaf as TEA Leaf
32+
participant tea_component as TEA Component
3333
participant tea_collection as TEA Collection
3434
participant tea_artifact as TEA Artefact
3535
@@ -40,8 +40,8 @@ sequenceDiagram
4040
user ->> tea_product: Finding all product parts
4141
tea_product ->> user: List of product parts
4242
43-
user ->> tea_leaf: Finding all versions of a part
44-
tea_leaf ->> user: List of all available versions (paginated)
43+
user ->> tea_component: Finding all versions of a part
44+
tea_component ->> user: List of all available versions (paginated)
4545
4646
user ->> tea_collection: Finding all artefacts for version in scope
4747
tea_collection ->> user: List of artefacts and formats available for each artefact

api-flow/publisher.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ sequenceDiagram
88
autonumber
99
actor Vendor
1010
participant tea_product as TEA Product
11-
participant tea_leaf as TEA Leaf
11+
participant tea_component as TEA Component
1212
participant tea_collection as TEA Collection
1313
1414
Vendor ->> tea_product: POST to /v1/product to create new product
1515
tea_product -->> Vendor: Product is created and TEA Product Identifier (PI) returned
1616
17-
Vendor ->> tea_leaf: POST to /v1/leaf with the TEA PI and leaf version as the payload
18-
tea_leaf ->> Vendor: Leaf is created and a TEA Leaf ID is returned
17+
Vendor ->> tea_component: POST to /v1/component with the TEA PI and component version as the payload
18+
tea_component ->> Vendor: Component is created and a TEA Component ID is returned
1919
20-
Vendor ->> tea_collection: POST to /v1/collection with the TEA Leaf ID as the and the artifact as payload
20+
Vendor ->> tea_collection: POST to /v1/collection with the TEA Component ID as the and the artifact as payload
2121
tea_collection ->> Vendor: Collection is created with the collection ID returned
2222
2323
```
@@ -29,16 +29,16 @@ sequenceDiagram
2929
autonumber
3030
actor Vendor
3131
participant tea_product as TEA Product
32-
participant tea_leaf as TEA Leaf
32+
participant tea_component as TEA Component
3333
participant tea_collection as TEA Collection
3434
35-
Note over Vendor,tea_leaf: Create new release
35+
Note over Vendor,tea_component: Create new release
3636
37-
Vendor ->> tea_leaf: POST to /v1/leaf with the TEA PI and leaf version as the payload
38-
tea_leaf ->> Vendor: Leaf is created and a TEA Leaf ID is returned
37+
Vendor ->> tea_component: POST to /v1/component with the TEA PI and component version as the payload
38+
tea_component ->> Vendor: Component is created and a TEA Component ID is returned
3939
40-
Note over Vendor,TEA Leaf: Add an artifact (e.g. SBOM)
41-
Vendor ->> tea_collection: POST to /v1/collection with the TEA Leaf ID as the and the artifact as payload
40+
Note over Vendor,TEA Component: Add an artifact (e.g. SBOM)
41+
Vendor ->> tea_collection: POST to /v1/collection with the TEA Component ID as the and the artifact as payload
4242
tea_collection ->> Vendor: Collection is created with the collection ID returned
4343
4444
```
@@ -50,12 +50,12 @@ sequenceDiagram
5050
autonumber
5151
actor Vendor
5252
participant tea_product as TEA Product
53-
participant tea_leaf as TEA Leaf
53+
participant tea_component as TEA Component
5454
participant tea_collection as TEA Collection
5555
56-
Vendor ->> tea_leaf: GET to /v1/leaf with the TEA PI to get the latest version
57-
tea_leaf ->> Vendor: Leaf will be returned
56+
Vendor ->> tea_component: GET to /v1/component with the TEA PI to get the latest version
57+
tea_component ->> Vendor: Component will be returned
5858
59-
Vendor ->> tea_collection: POST to /v1/collection with the TEA Leaf ID as the and the artifact as payload
59+
Vendor ->> tea_collection: POST to /v1/collection with the TEA Component ID as the and the artifact as payload
6060
tea_collection ->> Vendor: Collection is created with the collection ID returned
6161
```
Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
1-
# The TEA Leaf Object (TLO)
1+
# The TEA Component Index Object (TCO)
22

3-
The TEA LEAF is the object that indicates a product version. The API should be
4-
very agnostic as to how a "version" is indicated - semver, vers, name, hash or anything else.
3+
The TEA COMPONENT INDEX is the object that indicates a product component. The product may
4+
be constructed with one or multiple Tea Components, each with their own set of
5+
related artefacts.
6+
7+
For each TEA COMPONENT there is a TEA COMPONENT INDEX, which is a list of all versions
8+
for that component.
9+
10+
The API should be very agnostic as to how a "version" is indicated - semver, vers,
11+
name, hash or anything else.
512

613
## Major and minor versions
714

8-
Each leaf is for a sub-version or minor version (using semver definitions). A new
15+
Each component is for a sub-version or minor version (using semver definitions). A new
916
major version counts as a new product with a separate product object (TPO). Each
1017
product object has one or multiple TEI URNs.
1118

1219
For the API to be able to present a list of versions in a cronological order,
1320
a timestamp for a release is required.
1421

15-
## The Leaf Object
22+
## The Tea Component Object
1623

1724
- __Uuid__ unique for this object
1825
- __Product name__: A text field
@@ -21,17 +28,20 @@ a timestamp for a release is required.
2128
- __Pre-release__: A boolean flag indicating a pre-release (beta, rc)
2229
- __Tco_uuid__: A reference to the TEA Collection objet for this release
2330

31+
Note: In coming versions, there may be a flag indicating lifecycle status
32+
for a component.
33+
2434
## Handling the Pre-Release flag
2535

2636
The "Pre-release" flag is used to indicate that this is not a final release.
27-
For a given Leaf with a UUID, the flag can be set to indicate a "test", "beta", "alpha"
28-
or similar non-deployed release. It can only be set when creating the LEAF. The TEA implementation
29-
may allow it to be unset (False) once. This is to support
37+
For a given Component with a UUID, the flag can be set to indicate a "test", "beta", "alpha"
38+
or similar non-deployed release. It can only be set when creating the Component.
39+
The TEA implementation may allow it to be unset (False) once. This is to support
3040
situations where a object is promoted as is after testing to production version. The flag can not
31-
be set after initial creation and publication of the leaf.
41+
be set after initial creation and publication of the Component.
3242

3343
If the final version is different from the pre-release (bugs fixed, code changed, different binary)
34-
a new leaf with a new UUID and version needs to be created.
44+
a new Component with a new UUID and version needs to be created.
3545

3646
## References
3747

tea-index/tea-index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ the TEI is used to query for data. The TEI marks the product sold,
55
which can be a single unit or multiple units in a bundle.
66

77
- For a single product, the output will be metadata about the
8-
product and a TEA LEAF object.
8+
product and a TEA COMPONENT object.
99
- For a composed product consisting of a bundle, the response
10-
will be multiple TEA LEAF objects.
10+
will be multiple TEA COMPONENT objects.
1111

1212
In addition, all known TEIs for the product will be returned,
1313
in order for a TEA client to avoid duplication.
@@ -35,10 +35,10 @@ same vendor.
3535
- __type__: Type of identifier - one of "tei", "purl", or "cpe"
3636
- __id__: The complete identifier (str)
3737
- __leaves__: A list of product leaves
38-
- __uuid__: TEA LEAF UUID
38+
- __uuid__: TEA COMPONENT UUID
3939

40-
The TEA LEAF UUID is used in the LEAF API to find out which versions
41-
of the LEAF that exists.
40+
The TEA Component UUID is used in the Component API to find out which versions
41+
of the Component that exists.
4242

4343
The goal of the TEA index is to provide a selection of product
4444
versions to assist the user software in finding a match for the

0 commit comments

Comments
 (0)