|
1 | 1 | # Overview of the TEA API from a producer standpoint
|
2 | 2 |
|
3 |
| -* Note: Suggestion, input for the group |
4 |
| - |
| 3 | +## Bootstrapping |
5 | 4 |
|
6 | 5 | ```mermaid
|
7 |
| -sequenceDiagram |
8 |
| - participant Vendor |
9 |
| - participant TEA_API |
10 |
| - participant TEA_Index |
11 |
| - participant Product_Repository |
12 |
| - participant SBOM_Generator |
13 |
| - participant VEX_Generator |
14 |
| - participant VDR_Generator |
15 |
| - participant Consumer |
16 |
| -
|
17 |
| - Vendor->>Product_Repository: Create new product version |
18 |
| - Product_Repository-->>Vendor: Product version created |
19 |
| -
|
20 |
| - Vendor->>TEA_API: POST /collection (Create new collection with FIRST_MENTION lifecycle event) |
21 |
| - TEA_API->>TEA_Index: Update index with new collection |
22 |
| - TEA_API-->>Vendor: Collection created (UUID) |
23 |
| -
|
24 |
| - Vendor->>TEA_API: POST /product (Create new TEA Product with TEI) |
25 |
| - TEA_API->>TEA_Index: Update index with new product |
26 |
| - TEA_API-->>Vendor: Product created (TEI) |
27 |
| -
|
28 |
| - Vendor->>TEA_API: POST /leaf (Create new leaf for product version) |
29 |
| - TEA_API->>TEA_Index: Update index with new leaf |
30 |
| - TEA_API-->>Vendor: Leaf created (UUID) |
31 |
| -
|
32 |
| - Vendor->>SBOM_Generator: Generate SBOM for new version (including TEI) |
33 |
| - SBOM_Generator-->>Vendor: CycloneDX SBOM (signed) |
34 |
| - SBOM_Generator-->>Vendor: SPDX SBOM (signed) |
35 |
| -
|
36 |
| - Vendor->>TEA_API: POST /artifact (Add CycloneDX SBOM) |
37 |
| - TEA_API->>TEA_Index: Update index with new artifact |
38 |
| - TEA_API-->>Vendor: CycloneDX artifact added |
39 |
| -
|
40 |
| - Vendor->>TEA_API: POST /artifact (Add SPDX SBOM) |
41 |
| - TEA_API->>TEA_Index: Update index with new artifact |
42 |
| - TEA_API-->>Vendor: SPDX artifact added |
43 | 6 |
|
44 |
| - Note over Vendor,VEX_Generator: CVE discovered in SBOM dependency graph |
45 |
| -
|
46 |
| - Vendor->>VEX_Generator: Generate VEX document (triage state) |
47 |
| - VEX_Generator-->>Vendor: CycloneDX VEX (signed, with bom-link) |
48 |
| -
|
49 |
| - Vendor->>TEA_API: POST /artifact (Add CycloneDX VEX as independent artifact) |
50 |
| - TEA_API->>TEA_Index: Update index with new artifact |
51 |
| - TEA_API-->>Vendor: CycloneDX VEX artifact added |
52 |
| -
|
53 |
| - Note over Vendor,TEA_API: Time passes, product enters beta testing |
| 7 | +sequenceDiagram |
| 8 | + autonumber |
| 9 | + actor Vendor |
| 10 | + participant tea_product as TEA Product |
| 11 | + participant tea_leaf as TEA Leaf |
| 12 | + participant tea_collection as TEA Collection |
54 | 13 |
|
55 |
| - Vendor->>TEA_API: PUT /collection/{UUID} (Update collection with BETA_TESTING lifecycle event) |
56 |
| - TEA_API->>TEA_Index: Update index with lifecycle change |
57 |
| - TEA_API-->>Vendor: Collection updated |
| 14 | + Vendor ->> tea_product: POST to /v1/product to create new product |
| 15 | + tea_product -->> Vendor: Product is created and TEA Product Identifier (PI) returned |
58 | 16 |
|
59 |
| - Note over Vendor,TEA_API: Product reaches General Availability |
| 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 |
60 | 19 |
|
61 |
| - Vendor->>TEA_API: PUT /collection/{UUID} (Update collection with GENERAL_AVAILABILITY lifecycle event) |
62 |
| - TEA_API->>TEA_Index: Update index with lifecycle change |
63 |
| - TEA_API-->>Vendor: Collection updated |
| 20 | + Vendor ->> tea_collection: POST to /v1/collection with the TEA Leaf ID as the and the artifact as payload |
| 21 | + tea_collection ->> Vendor: Collection is created with the collection ID returned |
64 | 22 |
|
65 |
| - Note over Vendor,VDR_Generator: Security researcher reports a new vulnerability |
| 23 | +``` |
66 | 24 |
|
67 |
| - Vendor->>VDR_Generator: Generate VDR for reported vulnerability |
68 |
| - VDR_Generator-->>Vendor: CycloneDX VDR (signed, with bom-link) |
| 25 | +## Release life cycle |
69 | 26 |
|
70 |
| - Vendor->>TEA_API: POST /artifact (Add CycloneDX VDR as independent artifact) |
71 |
| - TEA_API->>TEA_Index: Update index with new artifact |
72 |
| - TEA_API-->>Vendor: CycloneDX VDR artifact added |
| 27 | +```mermaid |
| 28 | +sequenceDiagram |
| 29 | + autonumber |
| 30 | + actor Vendor |
| 31 | + participant tea_product as TEA Product |
| 32 | + participant tea_leaf as TEA Leaf |
| 33 | + participant tea_collection as TEA Collection |
73 | 34 |
|
74 |
| - Note over Vendor,VEX_Generator: Vulnerability status changes (e.g., patch available) |
| 35 | + Note over Vendor,tea_leaf: Create new release |
75 | 36 |
|
76 |
| - Vendor->>VEX_Generator: Generate new VEX document |
77 |
| - VEX_Generator-->>Vendor: New CycloneDX VEX (signed, with bom-link) |
| 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 |
78 | 39 |
|
79 |
| - Vendor->>TEA_API: POST /artifact (Add new CycloneDX VEX as independent artifact) |
80 |
| - TEA_API->>TEA_Index: Update index with new artifact |
81 |
| - TEA_API-->>Vendor: New CycloneDX VEX artifact added |
| 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 |
| 42 | + tea_collection ->> Vendor: Collection is created with the collection ID returned |
82 | 43 |
|
83 |
| - Note over Consumer,TEA_API: Consumer performs a search |
| 44 | +``` |
84 | 45 |
|
85 |
| - Consumer->>TEA_API: GET /search (Search for products or collections) |
86 |
| - TEA_API->>TEA_Index: Query index |
87 |
| - TEA_Index-->>TEA_API: Search results |
88 |
| - TEA_API-->>Consumer: Return search results |
| 46 | +## Adding a new artifact |
89 | 47 |
|
90 |
| - Note over Vendor,TEA_API: Product reaches End of Life |
| 48 | +```mermaid |
| 49 | +sequenceDiagram |
| 50 | + autonumber |
| 51 | + actor Vendor |
| 52 | + participant tea_product as TEA Product |
| 53 | + participant tea_leaf as TEA Leaf |
| 54 | + participant tea_collection as TEA Collection |
91 | 55 |
|
92 |
| - Vendor->>TEA_API: PUT /collection/{UUID} (Update collection with END_OF_LIFE lifecycle event) |
93 |
| - TEA_API->>TEA_Index: Update index with lifecycle change |
94 |
| - TEA_API-->>Vendor: Collection updated |
| 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 |
95 | 58 |
|
| 59 | + Vendor ->> tea_collection: POST to /v1/collection with the TEA Leaf ID as the and the artifact as payload |
| 60 | + tea_collection ->> Vendor: Collection is created with the collection ID returned |
96 | 61 | ```
|
0 commit comments