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
To support [Notary v2 goals][notaryv2-goals], upload, Persistence and discovery of signatures must be supported.
3
+
> This document explores the various options that were considered for the prototype. The current implementation is documented under the [README.md](./README.md) document.
4
+
5
+
To support [Notary v2 goals][notaryv2-goals], upload, persistence and discovery of signatures must be supported.
4
6
5
7
To minimize the complexity of registry operators and projects to adopt Notary v2, a balance between leveraging what already exists and new patterns to support secure discovery are explored.
6
8
@@ -171,6 +173,8 @@ Example **manifests** for a container image (`net-monitor:v1`) and two signature
171
173
172
174
### Signature Persistence - Option 2: oci-index
173
175
176
+
> **Note:** this is our working prototype/preferred method: See OCI image-spec issue: [Add Index Support for Artifact Type #806](https://github.com/opencontainers/image-spec/issues/806)
177
+
174
178
This option is similar to using oci-manifest. However, instead of parsing the signature object to determine the linkage between an artifact and signature, the `index.manifests` collection is utilized.
@@ -318,9 +322,7 @@ Example **manifests** for a container image (`net-monitor:v1`) and two signature
318
322
319
323
* OCI index does not yet support the [OCI config descriptor][oci-descriptor]. This would require a schema change to oci-index, with a version bump.
320
324
* This has been a [desired item for OCI Artifacts][oci-artifacts-index] to support other artifact types which would base on Index.
321
-
* An additional role check is performed, based on the artifact type. Also noted as a pro as registry operators may want to utilize this for other artifact types, making it a consistent model.
322
-
323
-
> **Note:** this is our working/preferred method: See OCI image-spec issue: [Add Index Support for Artifact Type #806](https://github.com/opencontainers/image-spec/issues/806)
325
+
* Registries that wish to implement role based authorization would implement and additional role check, based on the artifact type. Also noted as a pro as registry operators may want to utilize this for other artifact types, making it a consistent model. This likely minimizes this as a con-but noted for completeness.
### Signature Discovery - Option 2: Generic Reference Listing API
663
665
664
-
A slight alternative to the signatures API is to provide a generic reference listing API, where a paged collection of references are returned.
666
+
A slight alternative to the signatures API is to provide a generic reference listing API, where a paged collection of references are returned. The intent is to provide a broader usage API, beyond the signature type. For example, returning any multi-arch index references.
665
667
666
-
In the below example, the `net-monitor:v1` tag has a digest of: `sha256:90659bf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cbc042`
Using the diagram above, the `net-monitor:v1` manifest tag (4) has a digest of: `sha256:11wma2d22ae5ef400769fa51c84717264cd1520ac8d93dc071374c1be49a11wm`. When requesting the referenced objects, we see 2 signature objects being returned (wabbit-networks (6) & acme-rockets(7)), and an OCI multi-arch index (1).
667
671
668
672
```HTTP
669
-
GET /v2/<name>/manifests/sha256:90659bf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cbc042/references/
673
+
GET /v2/<name>/manifests/sha256:11wma2d22ae5ef400769fa51c84717264cd1520ac8d93dc071374c1be49a11wm/references/
670
674
```
671
675
672
-
The response will be in the following format:
676
+
The response could be in the following format. Note the additional `config-mediaType` to identify the specific artifact type in the results.
@@ -717,7 +721,7 @@ Get a list of paginated signatures from the registry. The response will include
717
721
Paginated tag results can be retrieved by adding an `n` parameter to the request URL, declaring that the response SHOULD be limited to `n` results. Starting a paginated flow MAY begin as follows:
718
722
719
723
```HTTP
720
-
GET /v2/<name>/manifests/sha256:90659bf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cbc042/references/list?n=<integer>
724
+
GET /v2/<name>/manifests/sha256:11wma2d22ae5ef400769fa51c84717264cd1520ac8d93dc071374c1be49a11wm/references/list?n=<integer>
721
725
```
722
726
723
727
The above specifies that a tags response SHOULD be returned, from the start of the result set, ordered lexically, limiting the number of results to `n`. The response to such a request would look as follows:
@@ -727,23 +731,23 @@ The above specifies that a tags response SHOULD be returned, from the start of t
727
731
Content-Type: application/json
728
732
Link: <<url>?n=<n from the request>&last=<last tag value from previous response>>; rel="next"
@@ -786,30 +790,30 @@ To support pagination (returning list results in pages) in a List method, the AP
786
790
To retrieve the next page of results, client **shall** pass the value of response's `next_page_token` in the subsequent `List` method call (in the request message's `page_token` field):
787
791
788
792
```HTTP
789
-
GET /v2/<name>/manifests/sha256:90659bf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cbc042/references/list?page_token=1&page_size=10&next_page_token=<token>
793
+
GET /v2/<name>/manifests/sha256:11wma2d22ae5ef400769fa51c84717264cd1520ac8d93dc071374c1be49a11wm/references/list?page_token=1&page_size=10&next_page_token=<token>
790
794
```
791
795
792
796
The above specifies that a tags response SHOULD be returned, from the start of the result set, ordered lexically, limiting the number of results to `n`. The response to such a request would look as follows:
The following are artifacts that represent a container image, or signature artifact. Depending on the example above, the signatures are represented as an oci manifest or oci index.
The following are artifacts that represent container images and signature artifacts. Depending on the example above, the signatures are represented as an oci manifest or oci index. Some tags are re-used to represent platform neutral examples. For instance, `net-monitor:v1` is represented as both a default linux image manifest, and a multi-arch index. In some examples, the platform is removed from the tag for brevity and focus on the topic at hand. _It is not suggested `:v1` tags can point to multiple things at the same time._
0 commit comments