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

Commit 6e25079

Browse files
committed
Clarify consistency in several places
Signed-off-by: Steve Lasker <[email protected]>
1 parent 450ae40 commit 6e25079

10 files changed

+39
-40
lines changed

artifact-manifest.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
11
# OCI Artifact Manifest
22

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.
44

55
# Phased Implementations Through Experimental Releases
66

77
To meet pressing timelines for delivering Secure Supply Chain artifacts in the fall of 2021, the spec will be split into two phases:
88

99
### Phase 1 - Reference Types
1010

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 signing and sbom scenarios.
1212

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.
1516
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.
1718
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.
1819

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)
2122

2223
### Phase 2 - Artifact Versioning Support
2324

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).
2526

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.
2728

2829
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.
2930

3031
### Migrating from Phase 1 to Phase 2
3132

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.
3334

3435
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.
3536

3637
## Reference Types
3738

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.
3940

4041
### Example OCI Artifact Manifests
4142

@@ -94,7 +95,7 @@ The `net-monitor:v1` image is persisted as an `oci.image.manifest`, with a uniqu
9495

9596
### Notary v2 Signatures and SBoM Persistance
9697

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.
9899

99100
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).
100101

@@ -108,7 +109,7 @@ A signature, or an SBoM, would be persisted with the content persisted in the `[
108109
```json
109110
{
110111
"schemaVersion": 3,
111-
"mediaType": "application/vnd.oci.artifact.reftype.manifest.v1+json",
112+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
112113
"artifactType": "cncf.notary.v2-rc1",
113114
"blobs": [
114115
{
@@ -138,7 +139,7 @@ The same `net-monitor:v1` image may have an associated SBoM. The SBoM content wo
138139
```json
139140
{
140141
"schemaVersion": 3,
141-
"mediaType": "application/vnd.oci.artifact.reftype.manifest.v1+json",
142+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
142143
"artifactType": "example.sbom.v0",
143144
"blobs": [
144145
{
@@ -168,7 +169,7 @@ The `net-monitor:v1` SBoM will also be signed, providing yet another leaf node.
168169
```json
169170
{
170171
"schemaVersion": 3,
171-
"mediaType": "application/vnd.oci.artifact.reftype.manifest.v1+json",
172+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
172173
"artifactType": "cncf.notary.v2-rc1",
173174
"blobs": [
174175
{
@@ -178,7 +179,7 @@ The `net-monitor:v1` SBoM will also be signed, providing yet another leaf node.
178179
}
179180
],
180181
"subjectManifest": {
181-
"mediaType": "application/vnd.oci.artifact.reftype.manifest.v1+json",
182+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
182183
"digest": "sha256:7a781a3930ea3ba1e54bc25c2bdc53edd0284c62ed651fe7b00369da519a3c1a",
183184
"size": 16724
184185
},
@@ -190,7 +191,7 @@ Once all artifacts are submitted, the registry would represent a graph of the `n
190191

191192
![net-monitor image with an sbom & signatures](media/net-monitor-graph.svg)
192193

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.
194195

195196
### Deletion and Ref Counting
196197

@@ -214,7 +215,7 @@ In the above example, all the artifacts are displayed without relation to each o
214215

215216
![flat listing of OCI artifacts](media/repo-listing-attributed.svg)
216217

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.
218219

219220
![expanded listing of OCI artifacts](media/repo-listing-attributed-expanded.svg)
220221

@@ -281,7 +282,7 @@ products.wabbit-networks.io/
281282

282283
![net-monitor image copy](media/net-monitor-copy.svg)
283284

284-
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`
285286

286287
```bash
287288
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
299300

300301
### OCI-Registry CLI
301302

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.
303304

304305
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.
305306

@@ -325,7 +326,7 @@ oci-reg copy \
325326
--copy-references disabled
326327
```
327328

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:
329330

330331
**Example**: Filter the types of enhancements:
331332

@@ -368,13 +369,13 @@ oci-reg delete registry.acme-rockets.io/net-monitor@sha256:b5b2b2c507a0944348e03
368369

369370
## Further reading
370371

371-
- [oci.artifact.reftype.manifest spec](./artifact-reftype-spec.md) for more info on the manifest
372+
- [oci.artifact.manifest spec][oci-artifact-manifest-spec] for more info on the manifest
372373
- [Referrers API][referrers-api] for more information on listing references
373374

374375
[lifecycle-management]: ./artifact-reftype-spec.md#lifecycle-management
375376
[oci-image-manifest-spec]: https://github.com/opencontainers/image-spec/blob/master/manifest.md
376377
[oci-artifacts]: https://github.com/opencontainers/artifacts
377-
[oci-artifact-reftype-manifest-spec]: ./artifact-reftype-spec.md
378+
[oci-artifact-manifest-spec]: ./artifact-spec.md
378379
[oci-image-index]: https://github.com/opencontainers/image-spec/blob/master/image-index.md
379380
[oci-distribution-spec]: https://github.com/opencontainers/distribution-spec
380381
[referrers-api]: ./manifest-referrers-api.md

artifact-manifest/net-monitor-image-nydus-ondemand-loading.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schemaVersion": 3,
3-
"mediaType": "application/vnd.oci.artifact.reftype.manifest.v1+json",
3+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
44
"artifactType": "cncf.nydus.v1-rc1",
55
"blobs": [
66
{

artifact-manifest/net-monitor-image-sbom.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schemaVersion": 3,
3-
"mediaType": "application/vnd.oci.artifact.reftype.manifest.v1+json",
3+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
44
"artifactType": "example.sbom.v0",
55
"blobs": [
66
{

artifact-manifest/net-monitor-image-signature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schemaVersion": 3,
3-
"mediaType": "application/vnd.oci.artifact.reftype.manifest.v1+json",
3+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
44
"artifactType": "cncf.notary.v2-rc1",
55
"blobs": [
66
{

artifact-reftype-spec.md renamed to artifact-spec.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# OCI Artifact Manifest Spec (Phase-1 Reference Types)
2-
3-
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.
43

54
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.
65

@@ -17,7 +16,7 @@ The following are Phase 1 examples:
1716

1817
## OCI Artifact Manifest Properties
1918

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.
2120

2221
- **`schemaVersion`** *int*
2322

@@ -26,25 +25,24 @@ For **Phase 1**, an artifact manifest provides a collection of blobs and a refer
2625

2726
- **`mediaType`** *string*
2827

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.
3029

3130
- **`artifactType`** *string*
3231

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`).
3433

3534
- **`blobs`** *array of objects*
3635

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.
3837

3938
- Each item in the array MUST be a [descriptor][descriptor], and MUST NOT refer to another `manifest` providing dependency closure.
4039
- The max number of blobs is not defined, but MAY be limited by [distribution-spec][oci-distribution-spec] implementations.
4140
- An encountered `descriptor.mediaType` that is unknown to the implementation MUST be ignored.
4241

4342
- **`subjectManifest`** *descriptor*
4443

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.
4846

4947
- **`annotations`** *string-string map*
5048

media/net-monitor-graph.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)