Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Use the exact credentials collected for the image domain #897

Merged
merged 2 commits into from
Jan 15, 2018

Conversation

squaremo
Copy link
Member

  1. add an argument for enabling request tracing in the registry client
  2. put a bit of extra logging in to report the nature of credentials being used in the registry client
  3. ask for credentials using the image's name, rather than the auth domain, since those can differ (e.g., index.docker.io vs auth.docker.io).

Fixes #896.

}

func (c creds) String() string {
if c.username == "" && c.password == "" && c.registry == "" && c.provenance == "" {

This comment was marked as abuse.

This comment was marked as abuse.

It's possible to be looking up an image at index.docker.io and be told
to authorise with auth.docker.io. In this case, the registry fetch
currently fails, because it has been supplied with credentials for
index.docker.io, and is asked for credentials for auth.docker.io.

Since, at the time, we're fetching a particular image and the
credentials are associated with the image's domain, this is a failure
of logic. We should use the exact credentials collected for the
image's domain.

I've added a bit more logging such that when --registry-trace is on,
the nature and provenance of the credentials will be shown.
@squaremo squaremo merged commit 98edb0e into master Jan 15, 2018
@squaremo squaremo deleted the issue/896-docker-reg-auth branch January 15, 2018 11:02
@squaremo
Copy link
Member Author

Thanks @tamarakaufler and @Sambooo

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

Successfully merging this pull request may close these issues.

3 participants