-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
docker-registry-ui and keyloak auth #165
Comments
change the auth on config.yml file to:
get error from the UI: login to registry:5000 ok using keyloak as auth realm. Is it that docker-registry-ui not support token auth??? |
Hi, the UI is not compatible with OAuth, only basic-auth is supported. This may require a lot of development. But I could try to do it on my free time. |
Can i some how auth registry with keyloack and UI (readonly) with basic-auth? |
I don't think so
From docker registry documentation It seems like this token auth is a custom protocol (flag in keycloak) 😢 |
I do authenticate registry with keyloack using token and its ok. |
The Docker-registry-ui image is based on nginx. How to integrate nginx with keycloak you can read here |
@vitalybrandes I did some research and I think I will be able to add this feature in a near future (keycloak token auth with private registry) @volschin This is really working with both the registry and the UI ? |
Don't know. What I want to make clear, this is nothing working out of the box. IIRC this is also part of nginx plus. |
|
Hi Joxit, great work! I would be interested in something like that as well. If all this is old news to you, my appologies: I think you would need to use the docker-v2 client-protocol with Keycloak. To get an Access-Token for the docker-registry from Keycloak is rather easy and looks something like this:
Keycloak answers with an Access-Token (which usually has a life-span of 5 Minutes), which can be used to query the registry with an Keycloak does not offer the refresh_token functionality described in docs.docker so most likely you would GET the Access-Token frequently to prevent invalid authentication. And I even think that Keycloak only permits "Basic Auth" with the docker-protocol. So it is a bit messy but the only way to implement external authentication for the UI I could think of would be a specific Keycloak-User for the UI and some kind of Oauth-Proxy in front of the whole thing, which would be up to the user to deploy... Edit: Or of course a login-form to provide your own Keycloak credentials to query the catalog. :) |
Hi @StWiemann, thank you for your message 😄 this work is a part of my 2.0.0 milestone I started to work on this in #167 but this was delayed with #176 which was longer than expected but I just finished it 😄 |
Hum.... I did some work on this issue, and it seems like this protocol is not suitable for this use. The token can be use for only one resource/scope. That means if the scope is I have three issues with this:
This works fine with the docker client because the password is saved on the disk.... But in our case 😨 |
Will be release in 2.0.0 🚀 |
Is there any additional auth modules except basic-realm ?
I am running registry with keycloak SSO and it will be great if i can login to UI with the same user.
Now , when i am trying to setup both, keyloack and basic-realm, i got issue with Registry (cannot login) as well with UI , can not login.
maybe any workaround?
my docker-compose file;
The text was updated successfully, but these errors were encountered: