|
1 | 1 | # Abstract
|
2 | 2 |
|
3 |
| -The Docker registry protocol has become the defacto standard across the container registry world ([https://github.com/docker/distribution/blob/master/docs/spec/api.md](https://github.com/docker/distribution/blob/master/docs/spec/api.md)). |
| 3 | +The Docker registry protocol has become the defacto standard across the container registry world. |
4 | 4 |
|
5 | 5 | In the OCI, having a solid, common distribution specification with conformance testing will ensure long lasting security and interoperability throughout the container ecosystem.
|
6 | 6 |
|
7 | 7 | ## Proposal
|
8 | 8 |
|
9 |
| -TL;DR; Move [https://github.com/docker/distribution/tree/master/docs/spec](https://github.com/docker/distribution/tree/master/docs/spec) to [https://github.com/opencontainers/distribution-spec](https://github.com/opencontainers/distribution-spec) |
| 9 | +TL;DR; Move [`api.md`][api.md] to a new [distribution-spec project](https://github.com/opencontainers/distribution-spec). |
10 | 10 |
|
11 | 11 | This proposal covers the distribution API spec, and while it does not cover the code for the docker-registry, that implementation is considered the reference implementation. There are other implementations of this protocol, not all are open-source though (Google gcr.io, Amazon ECR, CoreOS Quay, Gitlab registry, JFrog Artifactory registry, Huawei Dockyard, etc).
|
12 | 12 |
|
@@ -57,10 +57,90 @@ The API spec is currently considered v2 and we will start the specification at v
|
57 | 57 |
|
58 | 58 | ## Frequently Asked Questions (FAQ)
|
59 | 59 |
|
60 |
| -* Does this include the code of the docker-registry? |
61 |
| - * No. This is an API specification discussion. |
| 60 | +**Q: Does this include the code of the docker-registry?** |
| 61 | + |
| 62 | +A: No. This is an API specification discussion. |
| 63 | + |
| 64 | +**Q: Does this change the OCI Charter or Scope Table?** |
| 65 | + |
| 66 | +A: Not the charter, but it does change the scope table. |
| 67 | +This project is scoped to specifying per-image client ↔ registry interaction with an [HTTP][rfc7230]-based protocol. |
| 68 | +The following scope entries should be removed from the [scope table][scope]: |
| 69 | + |
| 70 | +* “Use of Hash as Content Addressable name for immutable containers”. |
| 71 | + This entry is in scope for this project, and a more detailed entry will be added as described below. |
| 72 | +* “Creating Reference spec for optional DNS based naming & distribution”. |
| 73 | + This entry conflates naming and distribution, which will be separated by this proposal. |
| 74 | +* “Standardizing on a particular Distribution method”. |
| 75 | + This proposal will provide one (of possibly many) distribution specifications, so the old “There is no current agreement on how to distribute content” no longer applies. |
| 76 | + |
| 77 | +The following entries should be added to the [scope table][scope]: |
| 78 | + |
| 79 | +* “Specifying authentication and authorization schemes”. |
| 80 | + Docker's current registry uses an [extension][token] of the [`Bearer`][rfc6750] [auth scheme][rfc7235-s2.1]. |
| 81 | + Work on specifying Docker's scheme will continue independently, and is orthogonal to the registry API. |
| 82 | + |
| 83 | + * What: Specifying authentication and authorization schemes |
| 84 | + * In/Out/Future: Out of scope |
| 85 | + * Status: N/A |
| 86 | + * Description: Defining protocols for authenticating and authorizing distribution access. |
| 87 | + * Why: As a HTTP-based protocol, clients and servers can negotiate authentication via HTTP's [challenge-response authentication framework][rfc7235-s2.1]. |
| 88 | + There is no need for the distribution specification to choose a particular authentication scheme, because clients receiving 401 and 407 responses can use IANA's [HTTP Authentication Scheme Registry][iana-auth] to look up referenced schemes and take appropriate action. |
| 89 | +frameworkIt is reasonable to provide a standardized way to use DNS based distribution in conjunction with OCI without requiring its use. |
| 90 | + |
| 91 | +* “Creating a reference spec for optional DNS based naming and discovery”. |
| 92 | + Discovery and registry protocols are completely separate and do not need to be added together. |
| 93 | + This entry replaces part of the previous “Creating Reference spec for optional DNS based naming & distribution” entry. |
| 94 | + |
| 95 | + * What: Creating a reference spec for optional DNS based naming and discovery |
| 96 | + * In/Out/Future: In scope for future specification |
| 97 | + * Status: Not currently being worked |
| 98 | + * Description: Define a protocol for resolving an image name to retrieval information. |
| 99 | + When we address this, we will also allow for alternative, parallel name-to-image discovery protocols in parallel with the OCI-specified protocol. |
| 100 | + * Why: It is reasonable to provide a standardized way to use DNS based distribution in conjunction with OCI without requiring its use. |
| 101 | + There are many good use cases for DNS based distribution, but not all use cases support this. |
| 102 | + Furthermore, encoding the location of a bundle into the bundle can cause issues with downloads from alternate locations other than the origin specified in the name. |
| 103 | + |
| 104 | +* “Specifying a distribution method”. |
| 105 | + This entry replaces part of the previous “Creating Reference spec for optional DNS based naming & distribution” and “Standardizing on a particular Distribution method” entries. |
| 106 | + |
| 107 | + Retrieving images covers the current “tag listing”, because tags are entries in the image format's manifests array. |
| 108 | + Other tag-listing endpoints needed for backwards-compatibility are therefore in scope as well. |
| 109 | + |
| 110 | + Repository actions and listing images within a repository are considered part of distribution policy or content management and are out of scope for this entry's per-image action. |
| 111 | + |
| 112 | + * What: Specifying a distribution method |
| 113 | + * In/Out/Future: In scope |
| 114 | + * Status: In progress (see opencontainers/distribution-spec) |
| 115 | + * Description: Define a protocol for image, manifest, config, and blob creation, retrieval, and deletion. |
| 116 | + Listing, creating, and deleting repositories and listing images within repositories are both out of scope for this entry. |
| 117 | + * Why: This specification will provide on (of possibly many) distribution specifications. |
| 118 | + Alternative distribution specifications may be developed for uses cases not covered by this specification, but defining them is out of scope for the OCI. |
| 119 | + |
| 120 | +* “Retrieving images by their content-addressable hash”. |
| 121 | + Docker's registery API does not currently provide endpoints for fetching image or manifest objects by digest, but this is the project where that will happen. |
| 122 | + |
| 123 | + * What: Retrieving images by their content-addressable hash |
| 124 | + * In/Out/Future: In scope |
| 125 | + * Status: In progress (see opencontainers/distribution-spec) |
| 126 | + * Description: Specify a protocol for retrieving an image from a distribution engine by the image's content-addressable hash. |
| 127 | + * Why: Using a hash as a name is a way to ensure a unique and container name without relying on a particular naming authority/or system. |
| 128 | + Using hashing for name is an acceptable addition as it does not encode any centralized namespace. |
| 129 | + |
| 130 | +The following entries should remain in the [scope table][scope] but not be addressed by this project: |
| 131 | + |
| 132 | +* “Specifying way to attach signatures”. |
| 133 | + We don't need to address this as part of distribution, because all resources are content-addressable and can be signed in external systems. |
62 | 134 |
|
63 | 135 | ## Related GitHub Issues
|
64 | 136 |
|
65 | 137 | * Simplifies tag listing: docker/distribution#2169
|
66 | 138 | * Allows listing of manifests: docker/distribution#2199
|
| 139 | + |
| 140 | +[api.md]: https://github.com/docker/distribution/blob/cb406d511b7b9163bff9b6439072e4892e5ae3b/docs/spec/api.md |
| 141 | +[iana-auth]: http://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml |
| 142 | +[rfc6750]: https://tools.ietf.org/html/rfc6750 |
| 143 | +[rfc7230]: https://tools.ietf.org/html/rfc7230 |
| 144 | +[rfc7235-s2.1]: https://tools.ietf.org/html/rfc7235#section-2.1 |
| 145 | +[scope]: https://www.opencontainers.org/about/oci-scope-table |
| 146 | +[token]: https://github.com/docker/distribution/blob/5cb406d511b7b9163bff9b6439072e4892e5ae3b/docs/spec/auth/token.md |
0 commit comments