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

Handle not-logged-in public repos with credsStore #731

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fahhem
Copy link

@fahhem fahhem commented Nov 1, 2024

Tested with a docker config that only has a credsStore but without an account for index.docker.io. Previously, this would result in a 401 when requesting the realm URL, but now it succeeds.

{
        "auths": {},
        "credsStore": "devpod"
}

@thesayyn
Copy link
Collaborator

thesayyn commented Nov 2, 2024

Thanks for the PR. This sounds like non-spec behavior I have never seen a docker credential helper returning empty username and password.

@fahhem
Copy link
Author

fahhem commented Nov 2, 2024

Usually they're used for private repositories, but for devpod it's used for all repositories, including public docker hub ones.

@thesayyn
Copy link
Collaborator

thesayyn commented Nov 7, 2024

I'd know for sure if there was reference implementations doing the same thing, othewise this sounds like a something non-spec compliant cred helper would do.

@fahhem
Copy link
Author

fahhem commented Nov 8, 2024

Is there a spec for this? If so, I can take it to the devpod repo and ask them to fix it instead. I don't care where I fix this, I just don't want to maintain a patched rules_oci nor a patched devpod.

If there's no spec, and it's just based on implementations, then rules_oci should be resilient to more implementations.

@thesayyn
Copy link
Collaborator

@fahhem
Copy link
Author

fahhem commented Nov 13, 2024

Unfortunately, that doesn't specify what to output when no username is needed/available. Both an empty string vs json with empty values seem like valid guesses based on that page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants