You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a config.json file with path-specific keys in the auths 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.
Attempt to perform an oras push to subdomain.harbor.com/team-a
Expected behavior: ORAS should fallback to the general host key and successfully push the artifact.
Observed behavior: ORAS successfully pushes the artifact, confirming that it uses the general host key.
By testing both scenarios, we can verify whether ORAS properly distinguishes between general and path-specific keys in the auths section of config.json. This distinction is critical for managing credentials in environments with path-specific scopes.
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
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
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: