-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Notary Server with Auth sending Hostname #1023
Comments
I've run into the same issue when I deployed notary service before. IMO, it might because when Distribution challenge the request from CLI(etc, docker CLI), the final target is Distribution service itself. The auth server only need to know whether this credential is valid for the resource in this Distribution. When Notary server challenge the request from CLI(etc, notary CLI), the final target is not Notary service itself but the GUN(global unique name). The auth server need to know whether this credential can access the resource related to this GUN. |
Adding on to @HuKeping's explanation: a notary server can hold trust data for multiple registries, so it's possible that you have signed metadata for both |
OK, so on my Token Authentication Service, should I ignore the 'hostname' part and consider that when Notary asks for that, it's for that registry? |
@rikatz ideally you should include the hostname. In the notary world this is considered part of the "Globally Unique Name" (a.k.a GUN). A notary server will happily host multiple unique GUNs as long as you can get tokens it accepts for them. When the docker client needs to push trust data to notary, it actually takes the name distribution recognizes, i.e. Note the notary server doesn't actually care what the "hostname" is, it is simply one way to make the names globally unique. The idea in part was eventually, the notary server could have a config option that would require the public part of a root key, included in root.json, is a public cert issued by a recognized CA, with the CN being the GUN of the trust repository. This would mean Notary wouldn't even require token auth to push data, it would simply confirm cryptographic signatures. |
If we jumped out of the container world, in a hight-level , notary can be used to hold the trust data for multi resource set, their relationship can be marked as For a running notary service, the relationship with IAM should be |
Closing this, solved on the Harbor code 😄 Thanks guys, for the great job! |
So, this is more a doubt than a proper issue:
I'm configuring Notary to use an authentication token based service (based on VMWare Harbor Authentication Service).
I'm having an strange behaviour, as when the Docker Distribution Service tries to authenticate against it, it sends the following request (this is the pure Docker Distribution Service, pointing it's authentication to the service):
As you can see, in the scope field it doesn't send my 'hostname/server' name.
The following is my Docker Distribution configured to do the same. This happens when I try to push an image with DOCKER_CONTENT_TRUST=1:
Now, the scope contains the hostname part, and not only the repo/image part.
Although this is described on the authentication scope documentation (https://docs.docker.com/registry/spec/auth/scope/), I can't understand why the Docker Distribution authentication does not send the hostname part of the image tag, and Notary does.
Is there a reason why this happens, or this is only some kind of inconsistence?
Thanks!!
The text was updated successfully, but these errors were encountered: