Skip to content

Conversation

shin-
Copy link
Contributor

@shin- shin- commented Sep 14, 2016

No description provided.

if 'identitytoken' in entry:
conf[registry] = {
'IdentityToken': entry['identitytoken']
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like auth is still required otherwise this function returns early. Is that expected or could someone has an identitytoken without an auth key?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the token holds all the information. I had Matt Bentley test it with
UCP yesterday and he confirmed it works, too.

On Wed, Sep 14, 2016, 8:44 AM Daniel Nephin notifications@github.com
wrote:

In docker/auth/auth.py
#1210 (comment):

@@ -189,12 +189,17 @@ def parse_auth(entries, raise_on_error=False):
'Found entry (registry={0}, username={1})'
.format(repr(registry), repr(username))
)

  •    conf[registry] = {
    
  •        'username': username,
    
  •        'password': password,
    
  •        'email': entry.get('email'),
    
  •        'serveraddress': registry,
    
  •    }
    
  •    if 'identitytoken' in entry:
    
  •        conf[registry] = {
    
  •            'IdentityToken': entry['identitytoken']
    
  •        }
    

It looks like auth is still required otherwise this function returns
early. Is that expected or could someone has an identitytoken without an
auth key?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/docker/docker-py/pull/1210/files/be7d0f01844d5c08ee157446ce96f5bc6381507c..4b46b792eb7bfa0d7cc218e103f43b200f7752a9#r78775816,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABCVnBWNUR-2ZV3xd-2LWjpupwpmpkeLks5qqBZTgaJpZM4J8SKp
.

'credentials store instead.'
)
return {}
conf[registry] = {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, either the client is using a cred store and all entries are empty, or they're not and none should be, so returning an empty dict here is not a big problem - but just in case weird hybrid config.json files start popping up, this should allow it to continue working.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a missing return or continue here, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah crud, yeah it needs a continue.

@shin-
Copy link
Contributor Author

shin- commented Sep 15, 2016

@dnephin PR updated - PTAL!

@shin- shin- force-pushed the identity-token-support branch 2 times, most recently from 08827ba to bb2d2e4 Compare September 15, 2016 19:35
Signed-off-by: Joffrey F <joffrey@docker.com>
@shin- shin- force-pushed the identity-token-support branch from bb2d2e4 to d731a43 Compare September 15, 2016 21:28
@dnephin
Copy link
Contributor

dnephin commented Sep 16, 2016

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants