a-langer / nexus-sso

Single Sign-On patch for Nexus OSS
Eclipse Public License 1.0
67 stars 16 forks source link

Logout not working #3

Closed pringinacio closed 1 year ago

pringinacio commented 1 year ago

Hi,

Do you know if logout function (via Nexus) with SAML and Keycloak is working?

We managed to configure correctly Nexus integrated with Keycloak via SAML. Login works correctly

Logout button on Nexus, appears to have logout, but after sign-in button is pressed, it redirects to Keycloak (as expected), and then back to Nexus. The credentials screen does not appear and the user is logged in again.

Checking the logs, the Pac4jAuthenticationListener.java is called (onLogout method). The method onLogout in Pac4jAuthenticationListener.java only has a log trace line and nothing is done.

a-langer commented 1 year ago

Hi,

When we log in via Keycloak (or other IdP), the browser saves cookies for two sites - 1) Nexus 2) Keycloak server. The logout button resets cookies only for Nexus, authorization on the Keycloak server remains relevant, so there is a redirect back to Nexus. If you want to see the credentials screen again, then you need to log out in your personal account on the Keycloak server. For testing, you can delete cookies from the browser manually or open the browser window in private mode.