Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support narrowly scoped registry authentication #840

Open
arewm opened this issue Nov 4, 2024 · 2 comments
Open

Support narrowly scoped registry authentication #840

arewm opened this issue Nov 4, 2024 · 2 comments
Labels
enhancement New feature or request v3 Things belongs to version 3.x
Milestone

Comments

@arewm
Copy link

arewm commented Nov 4, 2024

Global access might not be granted for an entire registry. Instead, multiple service accounts/robots may be used for narrowly scoped push/pull actions. Registry authentication should be done from most-specific to least-specific.

When checking for available credentials, the relevant repository is matched against available keys in its hierarchical order, going from most-specific to least-specific. For example, an image pull for my-registry.local/namespace/user/image:latest will result in a lookup in auth.json in the following order:

  • my-registry.local/namespace/user/image
  • my-registry.local/namespace/user
  • my-registry.local/namespace
  • my-registry.local

https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md#format

This is similar to the proposed change in google/go-containerregistry#1966.

@shizhMSFT shizhMSFT added enhancement New feature or request v3 Things belongs to version 3.x labels Nov 5, 2024
@shizhMSFT
Copy link
Contributor

Related to #836

@shizhMSFT
Copy link
Contributor

This requires a redesign of the auth module, which further requires a design revisit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v3 Things belongs to version 3.x
Projects
None yet
Development

No branches or pull requests

2 participants