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

Dockerhub credentials logged on startup #1912

Closed
dsyer opened this issue Sep 25, 2019 · 5 comments · Fixed by #1913
Closed

Dockerhub credentials logged on startup #1912

dsyer opened this issue Sep 25, 2019 · 5 comments · Fixed by #1913
Assignees
Labels
resolution/acknowledged security Pull requests that address a security vulnerability type/bug

Comments

@dsyer
Copy link

dsyer commented Sep 25, 2019

Oops?

2019-09-25 15:13:19.443 [main] INFO  o.t.d.DockerClientProviderStrategy - Found Docker environment with Environment variables, system properties and defaults. Resolved: 
    dockerHost=unix:///var/run/docker.sock
    apiVersion='{UNKNOWN_VERSION}'
    registryUrl='https://index.docker.io/v1/'
    registryUsername='...'
    registryPassword='...'
    registryEmail='...'
    dockerConfig='DefaultDockerClientConfig[dockerHost=unix:///var/run/docker.sock,registryUsername=...,registryPassword=<...>,registryEmail=<...>,registryUrl=https://index.docker.io/v1/,dockerConfigPath=/home/dsyer/.docker,sslConfig=<null>,apiVersion={UNKNOWN_VERSION},dockerConfig=<null>]'
@rnorth
Copy link
Member

rnorth commented Sep 25, 2019

@dsyer thanks for flagging - that's embarassing, as we've taken pains to santise logs that could potentially hold registry credentials elsewhere. Sorry if this has caused inconvenience.

We'll try and put out a patch release ASAP to fix this.

@rnorth rnorth added resolution/acknowledged security Pull requests that address a security vulnerability type/bug labels Sep 25, 2019
@rnorth rnorth self-assigned this Sep 25, 2019
@dsyer
Copy link
Author

dsyer commented Sep 25, 2019

They were empty, in my case. But I guess if a user has them in ~/.docker/config.json they will show up here, which would be best to avoid if possible. Thanks.

@dsyer
Copy link
Author

dsyer commented Sep 25, 2019

Looks like maybe it's from an upstream library anyway (com.github.docker-java:docker-java)?

@dsyer
Copy link
Author

dsyer commented Sep 25, 2019

... but actually we control the logging here: EnvironmentAndSystemPropertyClientProviderStrategy

@rnorth
Copy link
Member

rnorth commented Sep 25, 2019

Yes, it's something we control. Really, the logging code we have there is quite outdated and unnecessary - all registry auth is now resolved at pull-time rather than at startup.

I'll raise a PR shortly to drastically prune this logging.

rnorth added a commit that referenced this issue Sep 25, 2019
…risk leaking credentials on console output

Fixes #1912
rnorth added a commit that referenced this issue Sep 25, 2019
…ch risk leaking credentials on console output

Fixes #1912
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution/acknowledged security Pull requests that address a security vulnerability type/bug
Projects
None yet
2 participants