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

Http to https redirect breaks token passing #408

Closed
sheeprine opened this issue Oct 21, 2018 · 3 comments
Closed

Http to https redirect breaks token passing #408

sheeprine opened this issue Oct 21, 2018 · 3 comments

Comments

@sheeprine
Copy link

Actual behavior
In some case redirects cause the go-containerregistry library to think that we are not connecting to the same registry. For example when we are being redirected from http to https. Goland http.Client doesn't pass the Host in the request.

See google/go-containerregistry/pull/293

Expected behavior
During an https redirect, the authentication token should be passed over.

To Reproduce
Try to pull from a registry that redirects http to https.

Additional Information
Any dockerfile that tries to pull from a registry redirecting http to https will trigger it.

@priyawadhwa
Copy link
Collaborator

Hey @sheeprine thanks for opening this issue! I noticed you merged the go-containerregistry PR, would you be interested in updating the go-containerregistry dependencies for this project now (it should require a single dep ensure command in the repo)? No worries if not, I can do it as well!

@sheeprine
Copy link
Author

Hi @priyawadhwa thanks for updating dependencies.
Seems like the code to auto-detect scheme in google/go-containerregistry#125 is causing some troubles (always trying to connect in http even after being 308 redirected to https). I'll try to see if I can improve that and not hardcode scheme but suggest one and learn from transport in case of redirect.

@priyawadhwa
Copy link
Collaborator

@sheeprine sounds good, thanks for your contributions!

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

No branches or pull requests

2 participants