Skip to content

Conversation

@tych0
Copy link
Contributor

@tych0 tych0 commented Aug 17, 2017

To the end of encrypting passwords by default, there is now a pass backend, which will be useable on headless linuxen. Let's prefer that instead of the secretservice backend when choosing a default password backend on linux.

Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🦁

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM

github.com/docker/distribution b38e5838b7b2f2ad48e06ec4b500011976080621
github.com/docker/docker d58ffa0364c04d03a8f25704d7f0489ee6cd9634
github.com/docker/docker-credential-helpers v0.5.1
github.com/docker/docker-credential-helpers 3c90bd29a46b943b2a9842987b58fb91a7c1819b
Copy link
Contributor

@dnephin dnephin Aug 17, 2017

Choose a reason for hiding this comment

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

Should we tag a v0.6 release so we can keep using a tag?

What's the release policy on this repo?

@tych0
Copy link
Contributor Author

tych0 commented Aug 17, 2017 via email

@vdemeester
Copy link
Collaborator

@tych0 yes 👼 once it's merged in docker-credential-helpers I'll make a 0.6.0 release 😉

@andrewhsu
Copy link
Contributor

Does this handle migration of credentials from older format?

Also, any suitable tests we should have verify expected functionality of this PR?

@tych0
Copy link
Contributor Author

tych0 commented Aug 30, 2017 via email

@tych0 tych0 force-pushed the use-pass-backend branch from 3f5aac8 to 4ad5943 Compare August 30, 2017 21:38
@tych0
Copy link
Contributor Author

tych0 commented Aug 30, 2017

Hey guys, just a heads up, I've updated this version to a newer version than the 0.6.0 tag, because that includes a better initialization check. I can revert to the tag if we really want, but since a few other things aren't, and it offers a relevant feature, I figured I'd just use the hash.

I've also rebased on top of the latest master. Let me know if anything looks funny. Thanks!

@codecov-io
Copy link

codecov-io commented Aug 30, 2017

Codecov Report

Merging #451 into master will decrease coverage by 0.46%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #451      +/-   ##
==========================================
- Coverage   49.52%   49.05%   -0.47%     
==========================================
  Files         207      201       -6     
  Lines       17146    16454     -692     
==========================================
- Hits         8491     8072     -419     
+ Misses       8223     7962     -261     
+ Partials      432      420      -12

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

still LGTM

@tych0
Copy link
Contributor Author

tych0 commented Sep 20, 2017

Ping, any movement on this?

Tycho Andersen added 3 commits September 20, 2017 11:14
In the next patch, we'll use this to implement some logic about which
password backend to use.

Signed-off-by: Tycho Andersen <tycho@docker.com>
Signed-off-by: Tycho Andersen <tycho@docker.com>
Signed-off-by: Tycho Andersen <tycho@docker.com>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

Generally LGTM, but a couple of things:

  • Can we test/double check upgrading if a user currently uses the "secret service" credentials helper? I.e., if a user uses that currently, we should make docker keep using that (similar to the way we handle graph-drivers; if a previous directory of a graph-driver is detected, that one is used)
  • This needs an update to the documentation; https://github.com/docker/cli/blob/master/docs/reference/commandline/login.md#credentials-store. We need to mention the new helper, and describe what the defaults are / priority is
  • The docs also mention that credsStore must be present in the config.json to make docker use a credentials helper; is that still the case?

github.com/docker/distribution edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c
github.com/docker/docker 84144a8c66c1bb2af8fa997288f51ef2719971b4
github.com/docker/docker-credential-helpers v0.5.1
github.com/docker/docker-credential-helpers 3c90bd29a46b943b2a9842987b58fb91a7c1819b
Copy link
Member

Choose a reason for hiding this comment

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

We should update to a tagged release probably

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I mentioned in the comment above, there is no tagged version with commits relevant to this patch, so unless we tag a 0.6.1, I don't think we should.

Copy link
Contributor

@n4ss n4ss left a comment

Choose a reason for hiding this comment

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

Lgtm

@tych0
Copy link
Contributor Author

tych0 commented Sep 21, 2017 via email

@tych0 tych0 requested a review from mdlinville as a code owner September 21, 2017 14:32
@tych0
Copy link
Contributor Author

tych0 commented Sep 21, 2017

Ok, I've updated the docs. I think this should be good to go now.


### Default behavior

By default, Docker will look for the native binary on each of the platforms,
Copy link
Contributor

Choose a reason for hiding this comment

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

s/will look/looks

Maybe a table for the default backend per OS?

special case is that on Linux, Docker will fall back to the "secretservice"
binary if it cannot find the "pass" binary.

*NOTE:* If you do not supply a credential helper binary, Docker will store your
Copy link
Contributor

Choose a reason for hiding this comment

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

Just Note, not NOTE

s/will store/stores

@tych0
Copy link
Contributor Author

tych0 commented Sep 21, 2017 via email

Copy link
Contributor

@mdlinville mdlinville left a comment

Choose a reason for hiding this comment

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

Docs LGTM

@thaJeztah
Copy link
Member

and save the credsStore key for future reference.

Oh! I forgot (or wasn't aware) the client saves the credStore to the config.json after detection; I thought it checked each time if the user did not set this.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

sorry for the delay; some minor nits, but no showstopper if we want this merged before those are addressed

case is that on Linux, Docker will fall back to the "secretservice" binary if
it cannot find the "pass" binary.

*Note:* If you do not supply a credential helper binary, Docker stores your
Copy link
Member

Choose a reason for hiding this comment

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

This should be formatted as a note;

> **Note**: If you do not supply a credential helper binary, Docker stores your
> password in cleartext (base64 encoded) in your home directory!

Should this mention the actual file this is saved in as well (~/.docker/config.json)?

Copy link
Member

Choose a reason for hiding this comment

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

I see this is being referred to a couple lines up as well;

You can log into any public or private repository for which you have credentials. When you log in, the command stores encoded credentials in $HOME/.docker/config.json on Linux or %USERPROFILE%/.docker/config.json on Windows.

Also add a big warning about cleartext passwords.

Signed-off-by: Tycho Andersen <tycho@docker.com>
@tych0
Copy link
Contributor Author

tych0 commented Sep 26, 2017

Ok, I tried to address those (I'm not sure what you meant by formatted as a note, so I just moved the text into the paragraph, since it probably should be there anyway).

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit be8dab2 into docker:master Sep 26, 2017
@GordonTheTurtle GordonTheTurtle added this to the 17.10.0 milestone Sep 26, 2017
@thaJeztah
Copy link
Member

@tych0 @seemethere are there changes needed for packaging?

@tych0
Copy link
Contributor Author

tych0 commented Sep 26, 2017

Yep, we talked a few weeks ago about it and I think we're all on the same page.

@tych0
Copy link
Contributor Author

tych0 commented Sep 26, 2017

Oh, but we didn't actually talk about the OSX or windows packaging/install files. @seemethere do you know who does that?

@vdemeester
Copy link
Collaborator

@tych0 for docker4desktop, there is already osx-keychain and wincreds support (cc @ebriney @simonferquel) 😉

@tych0
Copy link
Contributor Author

tych0 commented Sep 26, 2017

Cool, are we distributing the credhelpers binaries in the packages?

@vdemeester
Copy link
Collaborator

I'm pretty sure we do yes 👼

@tych0
Copy link
Contributor Author

tych0 commented Sep 26, 2017

Sweet, so that part is solved already then :)

@ebriney
Copy link
Member

ebriney commented Sep 27, 2017

Yes, on windows and on mac, it is enabled by default. Thanks for this PR!

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.

10 participants