-
Notifications
You must be signed in to change notification settings - Fork 190
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
Potential issue with path-specific authentication keys in Docker config.json #1597
Comments
Hi @TommsNL , this is a known limitation and the repository-level auth is currently not supported. We are tracking the feature request on the backing library repo: oras-project/oras-go#840 |
Thanks for the reply @Wwwsylvia i'll be tracking oras-project/oras-go#840 then |
I thought Harbor called them namespaces |
Support retrieve and authenticate with path-specific authentication keys in |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This might be covered by the registries.conf feature that was talked about. I still haven't read the spec though. |
What happened in your environment?
When using a
config.json
file with path-specific keys in theauths
section (e.g.,subdomain.harbor.com/team-a
), ORAS does not appear to use these specific keys for authentication. Instead, it defaults to using the general host key (e.g.,subdomain.harbor.com
), even if a more specific key exists.This issue creates challenges when managing registries with different authentication scopes for specific paths.
Example:
Given the following
config.json
:When running:
ORAS appears to use the credentials for
subdomain.harbor.com
instead ofsubdomain.harbor.com/team-a
.I tested this behavior by setting up multiple credentials in the
auths
section with path-specific keys.What did you expect to happen?
I expected ORAS to:
subdomain.harbor.com/team-a
).subdomain.harbor.com
) only if no exact match exists.This behavior aligns with Docker's implementation for
config.json
files and is essential for managing credentials with path-specific scopes.How can we reproduce it?
Scenario 1: Path-specific key only
config.json
file with the following structure:subdomain.harbor.com/team-a
subdomain.harbor.com/team-a
and successfully push the artifact.401 Unauthorized erro
r, indicating that it failed to pick up the path-specific credentials.Scenario 2: General host key only
config.json
file with only the general host key:subdomain.harbor.com/team-a
By testing both scenarios, we can verify whether ORAS properly distinguishes between general and path-specific keys in the
auths
section ofconfig.json
. This distinction is critical for managing credentials in environments with path-specific scopes.What registry are we using?
Harbor (https://goharbor.io/)
What is the version of your ORAS CLI?
Oras Version: 1.2.0
What is your OS environment?
Red Hat Universal Base Image 8 (So based on RHEL 8)
Are you willing to submit PRs to fix it?
The text was updated successfully, but these errors were encountered: