Skip to content
This repository was archived by the owner on Jul 18, 2023. It is now read-only.

Commit 77cc3be

Browse files
committed
Converge dependencies & references to manifests
Signed-off-by: Steve Lasker <[email protected]>
1 parent b13f228 commit 77cc3be

File tree

1 file changed

+59
-38
lines changed

1 file changed

+59
-38
lines changed

artifact-manifest/artifact-manifest.md

Lines changed: 59 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ A CNAB may also be persisted with configuration information, along with a refere
110110

111111
The main scenarios include:
112112

113-
1. Discovery of content within a registry for content listing through CLI and visualizations.
113+
1. Discovery of content within a registry for content listing through a CLI and visualizations.
114114
1. Copying within and across registries.
115115
1. Deletion management, providing information to de-dupe content with reference counting.
116-
1. Support enhancing information related to existing content. Such as adding a Notary v2 signature or SBoM.
116+
1. Support enhancing information related to existing content. Such as adding a Notary v2 signature or SBoM artifacts.
117117
1. Validation, with required and optional references.
118118

119119
### Content Discovery
@@ -193,43 +193,50 @@ To support hard references, an additional dependencies collection is added to a
193193
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
194194
"artifactType": "application/vnd.cncf.notary.v2",
195195
"config": {
196-
"mediaType": "application/vnd.cncf.notary.config.v2",
196+
"mediaType": "application/vnd.cncf.notary.config.v2+json",
197197
"digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7",
198198
"size": 102
199199
},
200200
"blobs": [
201201
{
202-
"mediaType": "application/vnd.cncf.notary.v2.json",
202+
"mediaType": "application/vnd.cncf.notary.signature.v2+json",
203203
"digest": "sha256:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0",
204204
"size": 32654
205205
}
206206
],
207-
"dependencies": [
207+
"manifests": [
208208
{
209-
"mediaType": "application/vnd.oci.image.manifest.v1.config.json",
209+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
210210
"digest": "sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b",
211-
"size": 16724
211+
"size": 16724,
212+
"annotations: {
213+
"oci.distribution.relationship": "depends-on"
214+
}
212215
}
213-
]
214-
}
216+
],
217+
"annotations": {
218+
"org.cncf.notary.v2.signature.subject": "docker.io"
219+
}
215220
```
216221

222+
In the above example, the signing entity is Docker, which is represented as a notary scoped annotation: `"org.cncf.notary.v2.signature.subject": "docker.io"`
223+
217224
#### OCI-Registry CLI
218225

219-
To copy the above image and the associated signatures, a new `oci-reg` cli is proposed. The oci-reg cli is an independent tool that demonstrates the value of these collections, providing a unified standard means for working within and across different OCI compliant registry implementations.
226+
To copy the above image and the associated signatures, a new `oci-reg` cli is proposed for illustrative purposes. The `oci-reg` cli is an independent tool that demonstrates the value of these collections, providing a standard means for working within and across different OCI conformant registry implementations.
220227

221-
The following command would copy the `mysql:8` image from docker hub to the acme-rockets registry. The CLI could be run within the source or target cloud.
228+
The following command would copy the `mysql:8` image from docker hub to the acme-rockets registry. The CLI _could_ be run within the source or target cloud eliminating the download/upload network hops.
222229

223230
```bash
224231
oci-reg copy \
225-
--source hub.docker.io/mysql:8 \
232+
--source docker.io/mysql:8 \
226233
--target registry.acme-rockets.io/base-artifacts/mysql:8
227234
```
228235

229236
The `oci-reg copy` command would:
230237

231238
- assure the manifest and layer/blob digests remain the same
232-
- copy any artifacts that are dependent on the source artifact-manifest, persisting them in the target registry.
239+
- copy any artifacts that are dependent on the source artifact-manifest, persisting them in the target registry. These _could_ include Notary v2 signatures, SBoMs, GPL source or other referenced artifacts.
233240

234241
### Reference Artifacts
235242

@@ -239,7 +246,7 @@ There are a set of artifact types that declare references to other artifacts tha
239246

240247
![mysql image copy](./media/wordpress-helm-chart-copy.svg)
241248

242-
In the above scenario, a helm chart is copied from a public registry to the ACME Rockets registry. The `wordpress-chart:v5` is represented as an `application/vnd.oci.artifact.manifest.v1+json`. The `wordpress-chart:v5` helm chart references the `wordpress:v5` image and the `mysql:8` image. All three artifacts have signatures attesting to their authenticity.
249+
In the above scenario, a helm chart is copied from a public registry to the ACME Rockets registry. The `wordpress-chart:v5` is represented as an `application/vnd.oci.artifact.manifest.v1+json`. The `wordpress-chart:v5` helm chart references the `wordpress:v5` image and the `mysql:8` image. All three artifacts have Notary v2 signatures attesting to their authenticity.
243250

244251
As the copy is initiated, the `oci.artifact.manifest` of the `wordpress-chart:v5` is evaluated. As the chart references the same version (digest) of the `mysql:8` image already in theACME Rockets registry, the copy skips duplicating the content and moves to copying the `wordpress:v5` image, the `wordpress-chart:v5` and their associated signatures.
245252

@@ -251,40 +258,45 @@ To support the loose references between artifacts, a `references` collection is
251258

252259
```json
253260
{
254-
"schemaVersion": 2,
255261
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
256262
"artifactType": "application/vnd.cncf.helm.v3",
257263
"config": {
258264
"mediaType": "application/vnd.cncf.helm.config.v1+json",
259-
"size": 0,
260-
"digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7"
265+
"digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7",
266+
"size": 0
261267
},
262268
"blobs": [
263269
{
264-
"mediaType": "application/vnd.cncf.helm.chart.v1.tar",
270+
"mediaType": "application/vnd.cncf.helm.chart.v1+tar",
265271
"digest": "sha256:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0",
266272
"size": 32654
267273
},
268274
{
269-
"mediaType": "application/vnd.cncf.helm.values.v1.yaml",
275+
"mediaType": "application/vnd.cncf.helm.values.v1+yaml",
270276
"digest": "sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b",
271277
"size": 16724
272278
}
273279
],
274-
"references": [
280+
"manifests": [
275281
{
276-
"artifact": "wordpress:5.7",
277-
"artifactType": "application/vnd.oci.image.manifest.v1.config.json",
278-
"mediaType": "application/vnd.oci.image.manifest.v1.config.json",
282+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
279283
"digest": "sha256:5c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c82",
280-
"size": 1510
284+
"size": 1510,
285+
"annotations": [
286+
"oci.distribution.relationship": "references",
287+
"oci.distribution.artifact": "wordpress:5.7",
288+
"oci.distribution.artifactType": "application/vnd.oci.image.v1",
289+
]
281290
},
282291
{
283-
"artifact": "mysql:8",
284-
"artifactType": "application/vnd.oci.image.manifest.v1.config.json",
285-
"mediaType": "application/vnd.oci.image.manifest.v1.config.json",
292+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
286293
"digest": "sha256:8c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c31",
287-
"size": 1578
294+
"size": 1578,
295+
"annotations": [
296+
"oci.distribution.relationship": "references",
297+
"oci.distribution.artifact": "mysql:8",
298+
"oci.distribution.artifactType": "application/vnd.oci.image.v1",
299+
]
288300
}
289301
]
290302
}
@@ -302,7 +314,6 @@ As the `oci-reg copy` command is executed, the graph of references are expanded.
302314

303315
```json
304316
{
305-
"schemaVersion": 2,
306317
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
307318
"artifactType": "application/vnd.cncf.cnab.v1",
308319
"config": {
@@ -312,30 +323,37 @@ As the `oci-reg copy` command is executed, the graph of references are expanded.
312323
},
313324
"blobs": [
314325
{
315-
"mediaType": "application/vnd.cncf.cnab.v1.tar",
326+
"mediaType": "application/vnd.cncf.cnab.v1+tar",
316327
"digest": "sha256:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0",
317328
"size": 32654
318329
},
319330
{
320-
"mediaType": "application/vnd.cncf.cnab.params.v1.json",
331+
"mediaType": "application/vnd.cncf.cnab.params.v1+json",
321332
"digest": "sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b",
322333
"size": 16724
323334
}
324335
],
325-
"references": [
336+
"manifests": [
326337
{
327-
"artifact": "wordpress-chart:v5",
328-
"artifactType": "application/vnd.cncf.helm.v1.config.json",
329338
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
330339
"digest": "sha256:5c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c82",
331-
"size": 1510
340+
"size": 1510,
341+
"annotations": [
342+
"oci.distribution.relationship": "references",
343+
"oci.distribution.artifact": "wordpress-chart:v5",
344+
"oci.distribution.artifactType": "application/vnd.cncf.helm.v3",
345+
]
332346
},
333347
{
334348
"artifact": "helm-cli:3",
335-
"artifactType": "application/vnd.oci.image.manifest.v1.config.json",
336-
"mediaType": "application/vnd.oci.image.manifest.v1.config.json",
349+
"mediaType": "application/vnd.oci.image.manifest.v1+json",
337350
"digest": "sha256:8c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c31",
338-
"size": 1578
351+
"size": 1578,
352+
"annotations": [
353+
"oci.distribution.relationship": "references",
354+
"oci.distribution.artifact": "helm-cli:3",
355+
"oci.distribution.artifactType": "application/vnd.oci.image.manifest.v1",
356+
]
339357
}
340358
]
341359
}
@@ -396,6 +414,9 @@ OCI Artifact Manifests provide the following types of references:
396414
### Blobs Collection
397415

398416
All blobs are considered to be hard dependencies that must be resolvable within a registry. An artifact is considered invalid if the manifest blobs are not resolvable. Registries MAY implement de-duping, using ref-counting to assure at least one copy of the blob is resolvable for any given `oci.artifact.manifest`. OCI Artifact blobs are generalizations of the OCI Image Spec layers definition.
417+
## Manifests Collection
418+
419+
> **NOTE!** Update to consolidate the Dependencies and References collections
399420

400421
### Dependencies Collection
401422

0 commit comments

Comments
 (0)