You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 18, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: artifact-manifest.md
+24-23Lines changed: 24 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,41 +1,42 @@
1
1
# OCI Artifact Manifest
2
2
3
-
The OCI artifact manifest generalizes the use cases of [OCI image manifest][oci-image-manifest-spec]. This addition of a manifest does not change, nor impact the `image.manifest`. It provides a means to define a wide range of artifacts, including a chain of related artifacts enabling SBoMs, on-demand loading, signatures and metadata that can be related to an `image.manifest` or `image.index`without changing the `subjectManifest`
3
+
The OCI artifact manifest generalizes the use cases of [OCI image manifest][oci-image-manifest-spec] by removing constraints defined on the image-manifest such as a required `config` object and required & ordinal `layers`. It then adds a `subjectManifest` property supporting reference types. The addition of a new manifest does not change, nor impact the `image.manifest`. It provides a means to define a wide range of artifacts, including a chain of related artifacts enabling SBoMs, on-demand loading, signatures and metadata that can be related to an `image.manifest` or `image.index`. By defining a new manifest, registries and clients opt-into new capabilities, without breaking existing registry and client behavior or setting expectations for scenarios to function when the client and/or registry doesn't yet implement the new capabilities.
4
4
5
5
# Phased Implementations Through Experimental Releases
6
6
7
7
To meet pressing timelines for delivering Secure Supply Chain artifacts in the fall of 2021, the spec will be split into two phases:
8
8
9
9
### Phase 1 - Reference Types
10
10
11
-
Phase 1 is a time focused release, prioritizing a subset of capabilities needed to support reference types, enabling signing, sbom and image with on-demand loading type scenarios.
11
+
Phase 1 is a time focused release, prioritizing a subset of capabilities needed to support reference types enabling signingand sbom scenarios.
12
12
13
-
Reference types require two primary capabilities:
14
-
-**Reference Discovery API**, where the consumer finds references by querying what artifacts are related to a target artifact.
13
+
Reference types require:
14
+
-**Manifest reference**: a means to add content to a registry, referencing existing, unchanged, content.
15
+
-**Reference Discovery API**, where the consumer finds referenced artifacts by querying what artifacts are related to a subject artifact.
15
16
For example, what signatures or SBoMs are related to the `net-monitor:v1` container image. See the [manifest-referrers api](./manifest-referrers-api.md) for details.
16
-
-**Lifecycle management**, where a user can find and delete reference types, and a registry can garbage collect unreferenced content.
17
+
-**Lifecycle management**: as content is added to a registry, how is its lifecycle handled? Can a user can find and delete reference types, and how would a registry garbage collect unreferenced content.
17
18
As registries implement the [distribution-spec][oci-distribution-spec], content may be stored indefinitely. To assure registries MAY implement garbage collection, a manifest is used to identify the intent of the content. See [Lifecycle Management][lifecycle-management] for details. The spec doesn't dictate how an lifecycle management must be implemented, rather focuses on a set of consistent expectations for users to have when working across different implementations.
18
19
19
-
To separate the reference type deliverables for the fall of 2021 from future work, a `application/vnd.oci.artifact.reftype.manifest.v1+json` is provided.
20
-
For spec details on Phase 1, see [artifact-reftype-spec.md](./artifact-reftype-spec.md)
20
+
To separate the reference type deliverables for the fall of 2021 from future work, a `application/vnd.oci.artifact.manifest.v1+json` is provided.
21
+
For spec details on Phase 1, see [artifact-spec.md](./artifact-spec.md)
21
22
22
23
### Phase 2 - Artifact Versioning Support
23
24
24
-
Phase 2 will enable the full range of scenarios outlined in [WIP generic object spec #37](https://github.com/opencontainers/artifacts/pull/37).
25
+
Phase 2 will work to enable the full range of scenarios outlined in [WIP generic object spec #37](https://github.com/opencontainers/artifacts/pull/37).
25
26
26
-
By splitting out Phase 1 Reference types from phase 2, focus is placed upon a subset of capabilities in a short time, while providing time to review and evolve to the larger scenarios.
27
+
By splitting out **Phase 1**from **Phase 2**, focus is placed upon a subset of capabilities in a short time, while providing time to review and evolve the larger scenarios.
27
28
28
29
The goal is to migrate phase 1 implementations to phase 2 (derivative of PR #37). It is not the intent to have dozens of manifest types. Phase 1 is a point in time release to meet pressing security requirements for supply chain artifacts, while building knowledge to feed into phase 2.
29
30
30
31
### Migrating from Phase 1 to Phase 2
31
32
32
-
Registries that implement phase 1 will likely focus on implementing reverse indexes, supporting the referrers api and garbage collection to assure untagged reference types aren't automatically deleted. While the manifest format will change, the underlying capabilities for reverse indexes and lifecycle management will be maintained.
33
+
Registries that implement phase 1 will likely focus on implementing reverse indexes, supporting the referrers api and lifecycle management to assure untagged reference types aren't automatically deleted. While the manifest format will change, the underlying capabilities for reverse indexes and lifecycle management will be maintained.
33
34
34
35
All `oci.artifact.*` based content will be named and versioned, enabling distribution instances and distribution clients to determine the content and how it may be processed.
35
36
36
37
## Reference Types
37
38
38
-
There are a new set of scenarios requiring the ability to reference existing artifacts, including the ability to additively sign content or add a SBoM or image with on-demand loading. The addition of a [`subjectManifest`][subjectManifest] property supports linking artifacts through a reference from one artifact manifest to another artifact manifest. By storing these as separate, but linked artifacts, the existing OCI Image tool chain remains unchanged. Tooling that opts into understanding these reference types (eg. SBoM, Notary v2 signatures and Nydus image with on-demand loading) can find the referenced artifacts without changing the existing image tool chains.
39
+
There are a new set of scenarios requiring the ability to reference existing artifacts, including the ability to additively sign content or add a SBoM. The addition of a [`subjectManifest`][subjectManifest] property supports linking artifacts through a reference from one artifact manifest to another artifact manifest. By storing these as separate, but linked artifacts, the existing OCI Image tool chain remains unchanged. Tooling that opts into understanding these reference types (eg. SBoM, Notary v2 signatures and Nydus image with on-demand loading) can find the referenced artifacts without changing the existing image tool chains.
39
40
40
41
### Example OCI Artifact Manifests
41
42
@@ -94,7 +95,7 @@ The `net-monitor:v1` image is persisted as an `oci.image.manifest`, with a uniqu
94
95
95
96
### Notary v2 Signatures and SBoM Persistance
96
97
97
-
Following the [oci.artifact.reftype.manifest spec][oci-artifact-reftype-manifest-spec], reference type artifacts are pushed with an `manifest.artifactType`, and a `subjectManifest` for the artifact referenced.
98
+
Following the [oci.artifact.manifest spec][oci-artifact-manifest-spec], reference type artifacts are pushed with an `manifest.artifactType`, and a `subjectManifest` for the artifact referenced.
98
99
99
100
A signature, or an SBoM, would be persisted with the content persisted in the `[blobs]` collection, and a `subjectManifest` referencing the `net-monitor:v1` image (by digest).
100
101
@@ -108,7 +109,7 @@ A signature, or an SBoM, would be persisted with the content persisted in the `[
@@ -190,7 +191,7 @@ Once all artifacts are submitted, the registry would represent a graph of the `n
190
191
191
192

192
193
193
-
The Notary v2 signature and SBoM reference the `net-monitor:v1` image through the `subjectManifest` property. The `net-monitor:v1` image is represented as an oci-image, and requires no changes to its manifest to support the enhancements. The directionality of the `subjectManifest` reference enables links to existing content, without changing the existing content.
194
+
The Notary v2 signature and SBoM reference the `net-monitor:v1` image (as a digest) through the `subjectManifest` property. The `net-monitor:v1` image is represented as an oci-image, and requires no changes to its manifest to support the enhancements. The directionality of the `subjectManifest` reference enables links to existing content, without changing the existing content.
194
195
195
196
### Deletion and Ref Counting
196
197
@@ -214,7 +215,7 @@ In the above example, all the artifacts are displayed without relation to each o
214
215
215
216

216
217
217
-
In the above example, the Notary v2 signature, an SBoM and a collection of attributes are displayed as associated with their target artifact. The references can be collapsed as the `oci.artifact.reftype.manifest` provides the reference information.
218
+
In the above example, the Notary v2 signature, an SBoM and a collection of attributes are displayed as associated with their target artifact. The references can be collapsed as the `oci.artifact.manifest` provides the reference information.
218
219
219
220

As a reference, copying an image from a public registry to a private registry would involve `docker pull`, `docker tag` and `docker push`
285
+
As an example, copying an image from a public registry to a private registry would involve `docker pull`, `docker tag` and `docker push`
285
286
286
287
```bash
287
288
docker pull net-monitor:v1
@@ -299,7 +300,7 @@ Notary v2 signatures and a Notary v2 signed SBoM have been added to the `net-mon
299
300
300
301
### OCI-Registry CLI
301
302
302
-
To copy the above image and the associated signatures, an `oci-reg` cli is used for illustrative purposes. The `oci-reg` cli is an example of tools that could be built by the community, as they would work within and across different OCI conformant registry implementations.
303
+
To copy the above image and the associated signatures, an `oci-reg` cli is used for illustrative purposes. The `oci-reg` cli is an example of tools that _could_ be built by the community, as they would work within and across different OCI conformant registry implementations.
303
304
304
305
The following command would copy the `net-monitor:v1` 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.
305
306
@@ -325,7 +326,7 @@ oci-reg copy \
325
326
--copy-references disabled
326
327
```
327
328
328
-
As the referenced types are defined by the `manifest.referenceType`, copying specific content may be enabled:
329
+
As the referenced types are defined by the `manifest.subjectManifest`, copying specific content may be enabled:
The OCI artifact manifest generalizes the use of [OCI image manifest][oci-image-manifest-spec]. It provides a means to define a wide range of artifacts, including a chain of related artifacts enabling SBoMs, on-demand loading, Signatures and metadata.
2
+
The OCI artifact manifest generalizes the use cases of [OCI image manifest][oci-image-manifest-spec] by removing constraints defined on the image-manifest such as a required `config` object and required & ordinal `layers`. It then adds a `subjectManifest` property supporting reference types. The addition of a new manifest does not change, nor impact the `image.manifest`. It provides a means to define a wide range of artifacts, including a chain of related artifacts enabling SBoMs, on-demand loading, signatures and metadata that can be related to an `image.manifest` or `image.index`. By defining a new manifest, registries and clients opt-into new capabilities, without breaking existing registry and client behavior or setting expectations for scenarios to function when the client and/or registry doesn't yet implement the new capabilities.
4
3
5
4
To enable a fall 2021 focus on supply chain security, **Phase 1** will narrowly focus on Reference Type support, giving time for further generalization with less time constraints.
6
5
@@ -17,7 +16,7 @@ The following are Phase 1 examples:
17
16
18
17
## OCI Artifact Manifest Properties
19
18
20
-
For **Phase 1**, an artifact manifest provides a collection of blobs and a reference to a manifest of another artifact.
19
+
For **Phase 1**, an artifact manifest provides an optional collection of blobs and a reference to the manifest of another artifact.
21
20
22
21
-**`schemaVersion`***int*
23
22
@@ -26,25 +25,24 @@ For **Phase 1**, an artifact manifest provides a collection of blobs and a refer
26
25
27
26
-**`mediaType`***string*
28
27
29
-
This field contains the `mediaType` of this document, differentiating from [image-manifest][oci-image-manifest-spec] and [oci-image-index]. The mediaType for this manifest type MUST be `application/vnd.oci.artifact.manifest.v1-rc1+json`, where the version WILL change to reflect newer versions. `v1-rc1` indicates a stable release, and a step towards a completed `v1` spec. Artifact authors SHOULD support multiple `mediaType` versions to provide the best user experience for their artifact type.
28
+
This field contains the `mediaType` of this document, differentiating from [image-manifest][oci-image-manifest-spec] and [oci-image-index]. The mediaType for this manifest type MUST be `application/vnd.oci.artifact.manifest.v1+json`, where the version WILL change to reflect newer versions. Artifact authors SHOULD support multiple `mediaType` versions to provide the best user experience for their artifact type.
30
29
31
30
-**`artifactType`***string*
32
31
33
-
Phase 1 of the OCI Artifact spec will support reference types to existing [OCI Artifacts][oci-artifacts]. A `referenceType` is unique value, as registered with iana.org. See [registering unique types.][registering-iana]. The `referenceType` is equivalent to OCI Artifacts that used the `manifest.config.mediaType` to differentiate the type of artifact. Artifact authors that implement `oci.artifact.manifest` use `referenceType` to differentiate the type of artifact.
32
+
Phase 1 of the OCI Artifact spec will support reference types to existing [OCI Artifacts][oci-artifacts]. The REQUIRED `artifactType` is unique value, as registered with iana.org. See [registering unique types.][registering-iana]. The `artifactType` is equivalent to OCI Artifacts that used the `manifest.config.mediaType` to differentiate the type of artifact. Artifact authors that implement `oci.artifact.manifest` use `artifactType` to differentiate the type of artifact. example:(`example.sbom` from `cncf.notary`).
34
33
35
34
-**`blobs`***array of objects*
36
35
37
-
A collection of 0 or more blobs. The blobs array is analogous to [oci.image.manifest layers][oci-image-manifest-spec-layers], however unlike [image-manifest][oci-image-manifest-spec], the ordering of blobs is specific to the artifact type. Some artifacts may choose an overlay of files, while other artifact types may store indepdent collections of files.
36
+
An OPTIONAL collection of 0 or more blobs. The blobs array is analogous to [oci.image.manifest layers][oci-image-manifest-spec-layers], however unlike [image-manifest][oci-image-manifest-spec], the ordering of blobs is specific to the artifact type. Some artifacts may choose an overlay of files, while other artifact types may store indepdent collections of files.
38
37
39
38
- Each item in the array MUST be a [descriptor][descriptor], and MUST NOT refer to another `manifest` providing dependency closure.
40
39
- The max number of blobs is not defined, but MAY be limited by [distribution-spec][oci-distribution-spec] implementations.
41
40
- An encountered `descriptor.mediaType` that is unknown to the implementation MUST be ignored.
42
41
43
42
-**`subjectManifest`***descriptor*
44
43
45
-
A REQUIRED reference to an existing manifest. The artifact is said to be dependent upon the referenced `subjectManifest`.
46
-
- The item MUST be a [descriptor][descriptor] representing a manifest. Descriptors to blobs are not supported. The distribution-spec MUST return a `400` response code when `subjectManifest` is not found, and not a manifest.
47
-
- Future versions of the `oci.artifact.manifest` MAY support artifacts without a `subjectManifest`.
44
+
An OPTIONAL reference to any existing manifest within the repository. When specified, the artifact is said to be dependent upon the referenced `subjectManifest`.
45
+
- The item MUST be a [descriptor][descriptor] representing a manifest. Descriptors to blobs are not supported. The registry MUST return a `400` response code when `subjectManifest` is not found in the same repository, and not a manifest.
0 commit comments