-
Notifications
You must be signed in to change notification settings - Fork 81
Can't get SSO working with Keycloak 14 #74
Comments
@HS-157 Can you provide the Keycloak log when authentification fail? It seems that the |
@HS-157 Please try to use the release 0.6.0-prev1-SNAPSHOT, it will print more details when authentification fail. |
Hi @flytreeleft, here are the attached logs in debug mode with the pre-release 0.6.0 : |
Hi @flytreeleft I have similar issues, where output of nexus:
And here, the keycloak logs, which are requests from OpenResty, the reverse proxy in front of Nexus:
So I'm surprise to see there is no request to keycloak from Nexus itself Regards |
@asyd @HS-157 Please try to use nexus3-keycloak-plugin.zip which is just adjusted the logging behavior, and paste the output logs. |
hmm I finally found the issue.
|
@asyd It seems that the Keycloak client have no permission to view users, please configure the Keycloak client following Configure Keycloak realm client. |
@flytreeleft it have :/ I tried with a fresh keycloak instance and it works like a charm (FYI both have fined grain authz enabled). I need to investigate. Thanks for your feedback (I think you can close the ticket) |
Just in case, my setup didn't work because I modified the global |
@asyd Well done 😃 |
Hi,
I tried to set up a Nexus with SSO using nexus3-keycloak-plugin, but unfortunately, I was not successful.
For my tests, I use a Debian 10 VM with vagrant where install Docker and OpenResty via their official repositories.
I run Nexus via Docker and I create a new image from Nexus official image. In this image, I add nexus3-keycloak-plugin file and change logs from INFO to DEBUG mode. The container was lauch by systemd service via this command.
/usr/bin/docker run -p 8081:8081 --name nexus -v /srv/nexus:/nexus-data -e INSTALL4J_ADD_VM_PARAMS='-Xms1024m -Xmx1024m -XX:MaxDirectMemorySize=1024m' test/nexus3:3.32.0
I run directelly a local Keycloak for my tests in CLI via this command.
Nexus Dockerfile :
The versions of the components I have installed :
In first time, I have configure Nexus. Add
Keycloak Authentication Realm
in active list, in Realms admin page and I create a role inExternal role mapping > Keycloak
.Realm configuration
Admin role
In a second step, I create a new test realm, a new client, configure with info from readme and create a new roles in this client. After, create a new user and add the role.
Keycloak client configuration
Keycloak service account roles
Keycloak role
Then, in OpenResty config file, I add URL from auth server and the secret client.
For nexus3-keycloak-plugin, I deploie Keycloak OICD JSON from Keycloak on volume docker mounted in
/srv/nexus/etc/keycloak.json
with id user nexus.Finally, to test, I connect to OpenResty which asks me to connect on Keycloak page, then, I am redirected to Nexus, but my browser ask me a login / password. If I input the same thing as keycloak, it reask a login / password. If I click on cancel bouton, Nexus say
Operation failed as server could not be contacted
.Nexus log when authentification fail when my browser ask a login / password :
Browser ask a login / password
Nexus failed authentification
Attachment :
tcpdump -v -w tcpdump -i any port 443 or port 8080 or port 8081
- between openresty (port 443), keycloak (port 8080) and nexus (port 8081))The text was updated successfully, but these errors were encountered: