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

flatpak-oci-authenticator: try getting a token without credentials #3461

Merged

Conversation

owtaylor
Copy link
Contributor

Some registries require getting a token even to download an image
anonymously. So, if no auth has been configured, before prompting
the user for username/password, try without a BasicAuth header.

Signed-off-by: Owen W. Taylor otaylor@fishsoup.net


Another approach would be to handle this without going to the authenticator at all - if we get UNAUTHORIZED response with a WWW-Authenticate and don't have a token, try to get one anonymously. This patch posits that maybe we'll change things so that OCI remotes always have the OCI authenticator configured by default, and always try to get a token for every image.

@rh-atomic-bot
Copy link

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

Some registries require getting a token even to download an image
anonymously. So, if no auth has been configured, before prompting
the user for username/password, try without a BasicAuth header.

Signed-off-by: Owen W. Taylor <otaylor@fishsoup.net>
@owtaylor owtaylor force-pushed the oci-registry-no-credentials-token branch from 0b1ab04 to 24e485d Compare March 13, 2020 20:39
@alexlarsson alexlarsson merged commit fe3f17a into flatpak:master Mar 16, 2020
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.

None yet

3 participants