docker: fixup requests authentication#210
Conversation
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
83ed97c to
9a9c486
Compare
|
(I haven’t actually read the bug and reviewed this in detail, just a first impression): I very much like where this is going, and it would completely handle my concerns about #191. The one question I keep wondering about in this case is: what if no authentication is necessary, we send and empty body, and that succeeds? It seems to me that ideally we would want to send a request without the body, and wait for the server to either ACK the request and then send the body, or to respond with an authentication error. I vaguely seem to remember that something like that is possible in HTTP, a quick googling suggests sending an |
|
Found out what docker is doing in #211 |
Vendor after merging mtrmac/image:api-changes and update API use
It's totally wrong to rely on the
WWW-Authenticateheader fromping-gcr.iofor instance always return 401 on/v2/but that doesn't mean all repos need auth.This patch clean up a bit this situation by not reading the auth header from ping (nor storing it anywhere in the docker client).
From now on, each request will be challenged for authentication needs (which is probably what the docker client does as well, otherwise I cannot see how this would be possible :))
@mtrmac PTAL? For more background and if I missed anything else: https://bugzilla.redhat.com/show_bug.cgi?id=1413987
Signed-off-by: Antonio Murdaca runcom@redhat.com