Skip to content

Commit e57f6f2

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

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
@@ -692,6 +692,23 @@ To delete a blob, perform a `DELETE` request to a path in the following format:
692692
Upon success, the registry MUST respond with code `202 Accepted`.
693693
If the blob is not found, a `404 Not Found` code MUST be returned.
694694

695+
### Registry Proxying
696+
697+
A registry MAY operate as a proxy to another registry to delegate functionality or implement additional functionality.
698+
An example of delegating functionality is proxying pull operations to another registry.
699+
An example of adding functionality is implementing a pull-through cache of pulls to another registry.
700+
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.
701+
A `ns` query parameter on pull operations is OPTIONAL, but when used specifies the host in a repository name used by a client.
702+
The host in the repository name SHOULD be the first component of the full repository name used by a client.
703+
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.
704+
This original host component used by the client is referred to as the source host in the API documentation.
705+
A proxy registry MAY use the `ns` query parameter to resolve an upstream registry host.
706+
A registry MAY choose to ignore the `ns` query parameter.
707+
708+
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.
709+
A client SHOULD avoid sending `ns` query parameters to non-proxy registries.
710+
A client SHOULD NOT unintentionally send authorization credentials for an upstream registry to a proxy registry.
711+
695712
### Backwards Compatibility
696713

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

0 commit comments

Comments
 (0)