Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

Add config for docker auth #767

Merged
merged 9 commits into from
Apr 21, 2015
Merged

Conversation

krnowak
Copy link
Collaborator

@krnowak krnowak commented Apr 15, 2015

Please see commit messages to see config format.

krnowak added 5 commits April 15, 2015 14:05
The dockerAuth config files can be placed in both "auth.d" and
"docker.d" directory and their format is:

```
{
	"rktKind": "dockerAuth",
	"rktVersion": "v1",
	"indices": [
		"index.docker.io",
		"quay.io"
	],
	"credentials": {
		"user": "foo",
		"password": "bar"
	}
}
```
Will be used by docker auth unit tests.
@philips
Copy link
Contributor

philips commented Apr 15, 2015

Could you add some docs to this? Essentially we just need to tell the user how to use this like you did in the commit message. Thanks!

@krnowak
Copy link
Collaborator Author

krnowak commented Apr 15, 2015

Argh, I knew I forgot something. Yeah, will do.

@krnowak
Copy link
Collaborator Author

krnowak commented Apr 16, 2015

Adding a functional test for it might be tricky. I'll probably need some docker version of test-aci-auth-server.

@iaguis
Copy link
Member

iaguis commented Apr 17, 2015

LGTM

{
"rktKind": "dockerAuth",
"rktVersion": "v1",
"indices": ["index.docker.io", "quay.io"],
Copy link
Contributor

Choose a reason for hiding this comment

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

How did you end up on "index/indices" instead of "registry/registries"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually I guess this question should be directed upstream in docker2aci at @iaguis :D

Copy link
Contributor

Choose a reason for hiding this comment

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

(seems like docker/docker source code is mixed, clearest doc reference I can find is https://github.com/docker/docker/tree/master/docs/sources/terms)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My impression was that index was the first "point of contact" in docker hub API - getting metadata and whatnot. Another impression I had was that the basic HTTP authentication is done against that index and later we just receive a docker token for authentication.

But maybe I'm spouting nonsense or go too much into technicalities. Other names I was thinking about were "repositories" or "repos".

Copy link
Member

Choose a reason for hiding this comment

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

My impression was that index was the first "point of contact" in docker hub API - getting metadata and whatnot. Another impression I had was that the basic HTTP authentication is done against that index and later we just receive a docker token for authentication.

That's correct.

This is confusing. Docker Hub has index.docker.io and registry.hub.docker.com. According to this, something like quay.io or gcr would be a private registry. They don't mention anything about an index there and, in the rest of the documentation, when they talk about an index they refer only to the Docker Hub.

They don't expect people running their own indexes except for this private registry category and that's why they describe a registry as the part that just serves images, without authentication. But things like quay.io or gcr are full registries (in the broad sense of the term) with authentication included so I think registry is the correct term here.

TL;DR

Use registry 😜

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for the write up!

@jonboulle
Copy link
Contributor

Change LGTM , but a couple of questions to address

krnowak added 2 commits April 20, 2015 16:36
Initially docker.d was meant for configuration related to docker. But
currently we only have dockerAuth kind that is related to it. If some
other configuration kind relevant to docker appears in future then we
can think about bringing docker.d directory back.
Looks like registry more correct term than index, despite what
index.docker.io might hint. This is all confusing, so let's stick with
more popular term.
krnowak added a commit that referenced this pull request Apr 21, 2015
@krnowak krnowak merged commit f44a445 into rkt:master Apr 21, 2015
@kayrus kayrus deleted the krnowak/docker-auth branch February 5, 2016 12:25
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.

4 participants