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
Copy file name to clipboardExpand all lines: spec.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,8 +75,8 @@ Several terms are used frequently in this document and warrant basic definitions
75
75
-**Descriptor**: a reference that describes the type, metadata and content address of referenced content. Descriptors are defined under the OCI Image Spec <sup>[apdx-5](#appendix)</sup>.
76
76
-**Digest**: a unique identifier created from a cryptographic hash of a Blob's content. Digests are defined under the OCI Image Spec <sup>[apdx-3](#appendix)</sup>
77
77
-**Tag**: a custom, human-readable manifest identifier
78
-
-**Refers Field**: an association from one manifest to another, typically used to attach an artifact to an image. The refers field is included in the image and artifact manifests.
79
-
-**Referrers List**: a list of manifests with a refers relationship to specified digest. The referrers list is generated with a [query to a registry](#listing-referrers).
78
+
-**Subject**: an association from one manifest to another, typically used to attach an artifact to an image. The subject field is included in the image and artifact manifests.
79
+
-**Referrers List**: a list of manifests with a subject relationship to a specified digest. The referrers list is generated with a [query to a registry](#listing-referrers).
80
80
81
81
## Notational Conventions
82
82
@@ -209,7 +209,7 @@ Pushing an object typically works in the opposite order as a pull: the blobs mak
209
209
A useful diagram is provided [here](https://github.com/google/go-containerregistry/tree/d7f8d06c87ed209507dd5f2d723267fe35b38a9f/pkg/v1/remote#anatomy-of-an-image-upload).
210
210
211
211
A registry MAY reject a manifest of any type uploaded to the manifest endpoint if it references manifests or blobs that do not exist in the registry.
212
-
A registry MUST accept an otherwise valid manifest with a `refers` field that references a manifest that does not exist, allowing clients to push a manifest and referrers to that manifest in either order.
212
+
A registry MUST accept an otherwise valid manifest with a `subject` field that references a manifest that does not exist, allowing clients to push a manifest and referrers to that manifest in either order.
213
213
When a manifest is rejected for these reasons, it MUST result in one or more `MANIFEST_BLOB_UNKNOWN` errors <sup>[code-1](#error-codes)</sup>.
214
214
215
215
##### Pushing blobs
@@ -452,9 +452,9 @@ A registry SHOULD enforce some limit on the maximum manifest size that it can ac
452
452
A registry that enforces this limit SHOULD respond to a request to push a manifest over this limit with a response code `413 Payload Too Large`.
453
453
Client and registry implementations SHOULD expect to be able to support manifest pushes of at least 4 megabytes.
454
454
455
-
###### Pushing Manifests with Refers
455
+
###### Pushing Manifests with Subject
456
456
457
-
When pushing an image or artifact manifest with the `refers` field and the [referrers API](#listing-referrers) returns a 404, the client MUST:
457
+
When pushing an image or artifact manifest with the `subject` field and the [referrers API](#listing-referrers) returns a 404, the client MUST:
458
458
459
459
1. Pull the current referrers list using the [referrers tag schema](#referrers-tag-schema).
460
460
1. If that pull returns a manifest other than the expected image index, the client SHOULD report a failure and skip the remaining steps.
@@ -519,14 +519,14 @@ Registries should see [Enabling the Referrers API](#enabling-the-referrers-api)
519
519
520
520
To fetch the list of referrers, perform a `GET` request to a path in the following format: `/v2/<name>/referrers/<digest>` <sup>[end-12a](#endpoints)</sup>.
521
521
522
-
`<name>` is the namespace of the repository, and `<digest>` is the digest of the manifest specified in the `refers` field.
522
+
`<name>` is the namespace of the repository, and `<digest>` is the digest of the manifest specified in the `subject` field.
523
523
524
524
Assuming a repository is found, this request MUST return a `200 OK` response code.
525
525
If the registry supports the referrers API, the registry MUST NOT return a `404 Not Found` to a referrers API requests.
526
526
If the request is invalid, such as a `<digest>` with an invalid syntax, a `400 Bad Request` MUST be returned.
527
527
528
528
Upon success, the response MUST be a JSON body with an image index containing a list of descriptors.
529
-
Each descriptor is of an image or artifact manifest in the same `<name>` namespace with a `refers` field that specifies the value of `<digest>`.
529
+
Each descriptor is of an image or artifact manifest in the same `<name>` namespace with a `subject` field that specifies the value of `<digest>`.
530
530
The descriptors MUST include an `artifactType` field that is set to the value of `artifactType` for an artifact manifest if present, or the configuration descriptor's `mediaType` for an image manifest.
531
531
The descriptors MUST include annotations from the image or artifact manifest.
532
532
If a query results in no matching referrers, an empty manifest list MUST be returned.
@@ -627,7 +627,7 @@ To delete a manifest, perform a `DELETE` request to a path in the following form
627
627
Upon success, the registry MUST respond with a `202 Accepted` code.
628
628
If the repository does not exist, the response MUST return `404 Not Found`.
629
629
630
-
When deleting an image or artifact manifest that contains a `refers` field, and the [referrers API](#listing-referrers) returns a 404, clients SHOULD:
630
+
When deleting an image or artifact manifest that contains a `subject` field, and the [referrers API](#listing-referrers) returns a 404, clients SHOULD:
631
631
632
632
1. Pull the referrers list using the [referrers tag schema](#referrers-tag-schema).
633
633
1. Remove the descriptor entry from the array of manifests that references the deleted manifest.
@@ -651,7 +651,7 @@ This section describes client fallback procedures that MUST be implemented when
651
651
652
652
#### Unavailable Referrers API
653
653
654
-
A client that pushes an image or artifact manifest with a defined `refers` field MUST verify the [referrers API](#listing-referrers) is available or fallback to updating the image index pushed to a tag described by the [referrers tag schema](#referrers-tag-schema).
654
+
A client that pushes an image or artifact manifest with a defined `subject` field MUST verify the [referrers API](#listing-referrers) is available or fallback to updating the image index pushed to a tag described by the [referrers tag schema](#referrers-tag-schema).
655
655
A client querying the [referrers API](#listing-referrers) and receiving a `404 Not Found` MUST fallback to using an image index pushed to a tag described by the [referrers tag schema](#referrers-tag-schema).
656
656
657
657
##### Referrers Tag Schema
@@ -661,12 +661,12 @@ A client querying the [referrers API](#listing-referrers) and receiving a `404 N
661
661
```
662
662
663
663
-`<alg>`: the digest algorithm (e.g. `sha256` or `sha512`)
664
-
-`<ref>`: the digest from the `refers` field (limit of 64 characters)
664
+
-`<ref>`: the digest from the `subject` field (limit of 64 characters)
665
665
666
-
For example, a manifest with the `refers` field digest set to `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in the `registry.example.org/project` repository would have a descriptor in the referrers list at `registry.example.org/project:sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`.
666
+
For example, a manifest with the `subject` field digest set to `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in the `registry.example.org/project` repository would have a descriptor in the referrers list at `registry.example.org/project:sha256-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`.
667
667
668
668
This tag should return an image index matching the expected response of the [referrers API](#listing-referrers).
669
-
Maintaining the content of this tag is the responsibility of clients pushing and deleting image and artifact manifests that contain a `refers` field.
669
+
Maintaining the content of this tag is the responsibility of clients pushing and deleting image and artifact manifests that contain a `subject` field.
670
670
671
671
*Note*: multiple clients could attempt to update the tag simultaneously resulting in race conditions and data loss.
672
672
Protection against race conditions is the responsibility of clients and end users, and can be resolved by using a registry that provides the [referrers API](#listing-referrers).
@@ -681,9 +681,9 @@ The following describes procedures for upgrading to a newer version of the spec
681
681
The referrers API here is described by [Listing Referrers](#listing-referrers) and [end-12a](#endpoints).
682
682
When registries add support for the referrers API, this API needs to account for manifests that were pushed before the API was available using the [Referrers Tag Schema](#referrers-tag-schema).
683
683
684
-
1. Registries MUST include preexisting image and artifact manifests that are listed in an image index tagged with the [referrers tag schema](#referrers-tag-schema) and have a valid `refers` field in the referrers API response.
685
-
1. Registries MAY include all preexisting image and artifact manifests with a `refers` field in the referrers API response.
686
-
1. After the referrers API is enabled, Registries MUST include all newly pushed image and artifact manifests with a valid `refers` field in the referrers API response.
684
+
1. Registries MUST include preexisting image and artifact manifests that are listed in an image index tagged with the [referrers tag schema](#referrers-tag-schema) and have a valid `subject` field in the referrers API response.
685
+
1. Registries MAY include all preexisting image and artifact manifests with a `subject` field in the referrers API response.
686
+
1. After the referrers API is enabled, Registries MUST include all newly pushed image and artifact manifests with a valid `subject` field in the referrers API response.
0 commit comments