Skip to content

Commit 669cad7

Browse files
committed
Add registry proxying section
Define repository namespace query parameter for proxying. Signed-off-by: Derek McGowan <[email protected]>
1 parent 583e014 commit 669cad7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

spec.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
2. [Push](#push)
1717
3. [Content Discovery](#content-discovery)
1818
4. [Content Management](#content-management)
19+
- [Proxying](#proxying)
1920
- [Backwards Compatibility](#backwards-compatibility)
2021
- [Unavailable Referrers API](#unavailable-referrers-api)
2122
- [Upgrade Procedures](#upgrade-procedures)
@@ -26,7 +27,6 @@
2627
- [Warnings](#warnings)
2728
- [Appendix](#appendix)
2829

29-
3030
## Overview
3131

3232
### Introduction
@@ -709,6 +709,23 @@ Upon success, the registry MUST respond with code `202 Accepted`.
709709
If the blob is not found, a `404 Not Found` code MUST be returned.
710710
If blob deletion is disabled, the registry MUST respond with either a `400 Bad Request` or a `405 Method Not Allowed`.
711711

712+
### Registry Proxying
713+
714+
A registry MAY operate as a proxy to another registry to delegate functionality or implement additional functionality.
715+
An example of delegating functionality is proxying pull operations to another registry.
716+
An example of adding functionality is implementing a pull-through cache of pulls to another registry.
717+
When operating as a proxy, the `Host` header passed to the registry will be the host of the PROXY and NOT the host in the repository name used by the client.
718+
A `ns` query parameter on pull operations is OPTIONAL, but when used specifies the host in a repository name used by a client.
719+
The host in the repository name SHOULD be the first component of the full repository name used by a client.
720+
This host component in a repository name SHOULD be the registry host a client considers the primary source for a repository, however, a client MAY be configured to use a different host.
721+
This original host component used by the client is referred to as the source host in the API documentation.
722+
A proxy registry MAY use the `ns` query parameter to resolve an upstream registry host.
723+
A registry MAY choose to ignore the `ns` query parameter.
724+
725+
A client SHOULD be aware of whether a registry host is being used is a proxy, such as when the `ns` query parameter differs from the `Host` header.
726+
A client SHOULD avoid sending `ns` query parameters to non-proxy registries.
727+
A client SHOULD NOT unintentionally send authorization credentials for an upstream registry to a proxy registry.
728+
712729
### Backwards Compatibility
713730

714731
Client implementations MUST support registries that implement partial or older versions of the OCI Distribution Spec.

0 commit comments

Comments
 (0)