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

Private Registry and Read Only Users #7761

Closed
jjneely opened this issue Aug 27, 2014 · 5 comments
Closed

Private Registry and Read Only Users #7761

jjneely opened this issue Aug 27, 2014 · 5 comments
Labels
exp/expert kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Comments

@jjneely
Copy link

jjneely commented Aug 27, 2014

I have a private registry setup with docker-registry 0.7.3. I am testing with Docker 1.2.0. We use basic auth to keep it private for internal use. However, we also wanted to have read-only access for some of our automated processes. I did this by creating the following Apache 2.4 configuration.

<Location />
    AuthName "Docker Registry Login"
    AuthType Basic

    AuthUserFile "/etc/apache2/htpasswd.users"

    <RequireAll>
        Require valid-user
        # nagiosctl is a widely known secret
        Require not user nagiosctl
        <LimitExcept GET>
            # docker is our read-only user
            Require not user docker
        </LimitExcept>
    </RequireAll>
</Location>

In general, this works. Read/Write users can upload and pull images and our read-only user docker can pull and not push.

However, if someone does try a push operation authenticated as the docker user then the push command suddenly exists with an error code of 1.

$ sudo docker push docker.aws.42lines.net/jjneely/testing:latest
The push refers to a repository [docker.aws.42lines.net/jjneely/testing] (len: 1)
Sending image list
2014/08/27 10:51:11 $

Running the docker daemon in debug mode it clearly reports a 401 error from the server, but this never makes its way to a useful error message for the client. It would be great if the client would handle this with an appropriate error message.

@jessfraz
Copy link
Contributor

ping @dmcgowan @jlhawn @dmp42

@dmp42
Copy link
Contributor

dmp42 commented Feb 25, 2015

Put otherwise: a v1 push that fails for authentication denied does not output a meaningful message to the user.

@jessfraz jessfraz added exp/expert kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny and removed exp/expert labels Feb 25, 2015
@dmp42 dmp42 added exp/expert kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. and removed kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny labels Feb 25, 2015
@thaJeztah
Copy link
Member

related / dup of #11016?

@ghost
Copy link

ghost commented Mar 1, 2015

Yes, this is the same behavior that I reported with #11016.

@thaJeztah
Copy link
Member

@jfrazelle looks like dup, but perhaps you can decide. Also one is marked "black belt" and the other "white belt", which would be strange if they're indeed dup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/expert kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.
Projects
None yet
Development

No branches or pull requests

4 participants