Conversation
server.go
Outdated
There was a problem hiding this comment.
Should Index Server address be hard coded here?
There was a problem hiding this comment.
It's always been for search, except for the fact that it was buried inside registry.go before. Since the private registry doesn't support any kind of search (at least at the moment), I think it makes sense that we do it this way.
|
This is great -- I've been waiting for this capability for the past couple of months. Currently, my CI server
+1 for the capability allowed by this PR backflips |
|
@lukewpatterson Thanks for the feedback -- does the https requirement work for you? I was thinking of maybe adding a |
|
Hey @shin- , I like the development/testing option of HTTP w/ auth. I'd picture it as more of a One big thing that would help me is a complete, minimal |
|
LGTM |
registry/registry.go
Outdated
There was a problem hiding this comment.
@shin- If you are passing the request as a pointer why are you also returning it and using the result?
There was a problem hiding this comment.
It seemed convenient. Do you think it's too confusing? We can certainly do without.
There was a problem hiding this comment.
Having the result as the return value would make me believe that my original request is unmodified but that is not the case.
|
Hey @shin-, thanks for the work. I'm curious on how to compile the program to try it. I haven't found any instructions so far on how to build Docker. Any hints? |
|
@shin- This needs to be rebased. |
|
ping @shin- |
|
Done! |
|
I tried to get this working and ran into problems with the login function. It seems that Login in auth/auth.go does not handle a 401 response correctly. I added the following code which gets the job done but may not be what you want in the end: |
|
Thanks @dvoet, that might be an oversight on my part, I'll take a look asap. |
|
@dvoet : Oh hey, I just had an epiphany today about this. Of course, the /v1/users/ endpoints need to be whitelisted for this to work, otherwise you're asking someone to be logged in before you're letting them log in... |
|
@shin- But if it is white listed I don't think authentication will happen on a login call and the credentials will not be verified. If they get set incorrectly in the auth config it will lead to 401 error down the line. The normal basic auth pattern is a challenge/response which is what I was trying to accomplish. |
|
the URL called in pingRegistryEndpoint needs to be whitelisted |
|
I see what you mean! I'll integrate your patch. Thanks! |
|
Integrated @dvoet 's patch. Thanks! Also rebased all the changes. Can you guys take another look? :) |
|
@dvoet @allardhoeve is this working for you ? |
|
yes |
|
@crosbymichael @vieux Are we ready to merge this? If there's any outstanding issue I'm available to sort it out. :) |
|
@crosbymichael @creack I must say I wasn't able to get it working, probably my nginx config... Let's say I don't have access to the index.docker.io. Hoe do I create my login/passwd ? |
|
Login/passwords aren't created dynamically, they're in the nginx/apache2/etc. config. |
|
Yes, on the docker cli size I meant. On Wed, Nov 13, 2013 at 11:28 AM, Joffrey F [email protected]:
|
|
|
|
Works without issues, here's my working nginx config: https://gist.github.com/lucas-clemente/7518350 In Looking forward to seeing this merged! |
|
to be well tested |
|
Good point :-) Can all people asking for it spend some time testing and provide some feedback? |
|
I have used the login, push and pull commands successfully. |
|
ping @shin- This needs to be rebased |
RequestFactory is no longer a singleton (can be different for different instances of Registry) Registry now has an indexEndpoint member Registry methods that needed the indexEndpoint parameter no longer do so Registry methods will only use token auth where applicable if basic auth is not enabled.
|
Rebased! |
|
Can confirm re based version does exactly what it says on the tin Will +1 again for merging |
|
sweet! thanks guys. |
|
@shin- great work! I'm having some trouble though because this line in the registry code is blowing up because the auth header is Basic rather than Token, any thoughts? |
|
@lmars Unsetting the Authorization header in the web server worked for me, eg for nginx: |
|
Anyone with the final nginx conf that will work for SSL and basic auth ? |
|
@shin- the file you pointed works fine but has no basic auth support. any example with basic auth? if i add to my config nothing i only get HTTP 500 responses from registry |
|
@aluedeke check out docker-archive/docker-registry#82 (comment) =) |
|
Was the use of basic auth over HTTP connections ever been implemented (some thing like A real life scenario for this would be trying to deploy a docker image to multiple VMs in a private network which this same network contains a private Docker registry. |
|
@farahfa Docker will refuse to send credentials over plain text connections. |
full diff: moby/libnetwork@0025177...90afbb0 includes: - docker/libnetwork#/2459 Fix Error Check in NewNetwork - docker/libnetwork#/2466 Revert "Merge pull request moby#2339 from phyber/iptables-check" - reverts docker/libnetwork#/2339 controller: Check if IPTables is enabled for arrangeUserFilterRule - re-opens moby/libnetwork#2158 dockerd when run with --iptables=false modifies iptables by adding DOCKER-USER - re-opens moby#35777 With iptables=false dockerd still creates DOCKER-USER chain and rules - re-opens docker/for-linux#136 dockerd --iptables=false adds DOCKER-USER chain and modify FORWARD chain anyway Signed-off-by: Sebastiaan van Stijn <[email protected]>
controller: Check if IPTables is enabled for arrangeUserFilterRule
This reverts commit 8d76333, reversing changes made to bdd0b7b. Signed-off-by: Arko Dasgupta <[email protected]>
Revert "Merge pull request moby#2339 from phyber/iptables-check"
This enables people to put nginx or apache with basic auth in front of their private registry and still be able to push and pull images.
Only allowed over HTTPS for now.