This repository has been archived by the owner on Mar 16, 2021. It is now read-only.
Refs #14181 - Fix authentication validation when creating registry #148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On 9ea4059 Docker.authenticate! was
calling /auth on the Docker host API. This kind of authentication was
not correct, as it was authenticating access to the Docker host, not to
the registry.
Instead, we just perform a restclient call with basic authentication
against an endpoint as per https://docs.docker.com/v1.7/reference/api/hub_registry_spec/#authentication-and-authorization
We should support token authentication as well after this and add a
new field to the form.
Feel free to test with registry.access.redhat.com or https://registry.hub.docker.com/ - the latter will ask for username password, the former would work with anything.