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

Auth does not respect osxkeychain #946

Closed
ALRubinger opened this issue Feb 15, 2018 · 3 comments
Closed

Auth does not respect osxkeychain #946

ALRubinger opened this issue Feb 15, 2018 · 3 comments

Comments

@ALRubinger
Copy link

Description

AuthConfig contains a constructor:

public AuthConfig(String credentialsEncoded, String email) {
        String credentials = new String(Base64.decodeBase64(credentialsEncoded));
        String[] parsedCreds = credentials.split(":",2);
        username = parsedCreds[0];
        password = parsedCreds[1];
        this.email = email;
        auth = null;
        authEncoded = createAuthEncoded();
    }

On OSX platforms, the auth information is not simply encoded as Base64 pair in form username:password but instead uses the MacOS keychain:

https://docs.docker.com/engine/reference/commandline/login/#privileged-user-requirement

AuthConfig needs to be aware of this limitation and correctly receive the credentials to support operations like push to Docker Hub

Info

  • d-m-p version : 0.24-SNAPSHOT
  • Maven version (mvn -v) : N/A

  • Docker version :
  • If it's a bug, how to reproduce :
  • If it's a feature request, what is your use case :
  • Sample project : [GitHub Clone URL]
@kenfinnigan
Copy link

Currently the fabric8-maven-plugin depends on docker-maven-plugin v0.22.1

It's possible that it needs to be upgraded to 0.24.0 as I've seen that version access osx credentials when used directly

@rhuss
Copy link
Collaborator

rhuss commented Feb 20, 2018

@ALRubinger @kenfinnigan Yes, external credentialhelper support was introduced with #821 in 0.23.0

From https://dmp.fabric8.io/#authentication:

The most secure way is to rely on docker’s credential store or credential helper and read confidential information from an external credentials store, such as the native keychain of the operating system. Follow the instruction on the docker login documentation.

So I recommend to upgrade fmp. But of course it could be that there is still a bug in dmp, so happy to hunt this if an upgrade to 0.24.0 doesnt help.

@rhuss
Copy link
Collaborator

rhuss commented Apr 14, 2018

There was a bug up to 0.25.1 which broke the osxkeychain support for index.docker.io. Fixed with 0.25.2 (coming soon)

@rhuss rhuss closed this as completed in 83d9dcb Apr 14, 2018
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

3 participants