This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
Support auth protocol introduced by docker 1.8 #282
Merged
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.
NOTE WELL: This is some preliminary work to fix issue #276. I'm about to leave for my vacation. @mssola please take a look at the code and vet it. I can fix the broken tests once I'm back on the 1st of September (unless you really want to take care of that once you are back from your vacation).
The issue
The authorization protocol changed with Docker 1.8:
service=&scope=repository:namespace/image:push,pull
In other words, the daemon always asks for push,pull, even if you are
just doing a pull. The auth server is supposed to respond in the
following fashion:
user to authentictae
token
When user tries the token path against the auth server with credentials:
maximum credentials allowed this user on this repository in this service
that is a subset of the scope provided.
The daemon will always ask for push,pull, and - as long as I am validly
authenticated - the auth server should always return 200 with a valid
Web token. The Web token will list the max I am allowed.
access only
pull access