Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Handle a Docker daemon without registry info #10

Merged
merged 1 commit into from
Jun 5, 2017

Conversation

mlaventure
Copy link
Contributor

The current implementation of the ElectAuthServer doesn't handle well when the
default Registry server is not included in the response from the daemon Info
endpoint.

That leads to the storage and usage of the credentials for the default registry
(https://index.docker.io/v1/) under an empty string on the client config file.

Sample config file after a login via a Docker Daemon without Registry
information:

{
	"auths": {
		"": {
			"auth": "***"
		}
	}
}

That can lead to duplication of the password for the default registry and
authentication failures against the default registry if a pull/push is performed
without first authenticating via the misbehaving daemon.

Also, changes the output of the warning message from stdout to sdterr as
per dnephin suggestion.

Signed-off-by: Marcus Martins [email protected]
(cherry picked from commit 862649707ef2b901fc0535895de7456fc4c9c0c3)


Cherry pick of docker/cli#126

The current implementation of the ElectAuthServer doesn't handle well when the
default Registry server is not included in the response from the daemon Info
endpoint.

That leads to the storage and usage of the credentials for the default registry
(`https://index.docker.io/v1/`) under an empty string on the client config file.

Sample config file after a login via a Docker Daemon without Registry
information:
```json
{
	"auths": {
		"": {
			"auth": "***"
		}
	}
}
```

That can lead to duplication of the password for the default registry and
authentication failures against the default registry if a pull/push is performed
without first authenticating via the misbehaving daemon.

Also, changes the output of the warning message from stdout to sdterr as
per dnephin suggestion.

Signed-off-by: Marcus Martins <[email protected]>
(cherry picked from commit 862649707ef2b901fc0535895de7456fc4c9c0c3)
@mavenugo mavenugo mentioned this pull request May 31, 2017
23 tasks
@marcusmartins
Copy link
Contributor

@mlaventure do you need LGTM here?

@andrewhsu
Copy link
Contributor

LGTM

integration and unit tests are green

@andrewhsu andrewhsu merged commit 4910da9 into docker-archive:17.06 Jun 5, 2017
@mlaventure mlaventure deleted the chp-cli-126 branch June 5, 2017 17:16
@mlaventure
Copy link
Contributor Author

@marcusmartins they're always appreciated ;-)

PR is here so the integration-test can run on it, unless the tests fail or there's a conflict, I don't think we'll require formal LGTMs. However, an extra pair of eyes is always useful.

@marcusmartins
Copy link
Contributor

post merge LGTM. thanks @mlaventure

@andrewhsu andrewhsu modified the milestone: 17.06.0 Jul 12, 2017
andrewhsu added a commit that referenced this pull request Jul 14, 2017
Add reflective alpine images to other components
Upstream-commit: f373edf
Component: packaging
docker-jenkins pushed a commit that referenced this pull request Jul 5, 2018
[18.06] vendor: update buildkit to 9acf51e491
Upstream-commit: c9bfc3c842d847dfeee105756e456be148b9d461
Component: engine
silvin-lubecki pushed a commit to silvin-lubecki/docker-ce that referenced this pull request Jan 30, 2020
…e_images

Add reflective alpine images to other components
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants