kafka-ui icon indicating copy to clipboard operation
kafka-ui copied to clipboard

keycloak logout-success-url

Open AlexeyGA opened this issue 2 years ago • 3 comments

Issue submitter TODO list

  • [X] I've looked up my issue in FAQ
  • [X] I've searched for an already existing issues here
  • [X] I've tried running master-labeled docker image and the issue still persists there
  • [X] I'm running a supported version of the application which is listed here

Describe the bug (actual behavior)

Keycloak v17 is used for OAuth2 and KafkaUI 0.7.1. When clicking on logout, there is no redirection from the Keycloak endpoint back to KafkaUI. I suspect that the redirect_url parameter is missing in the URL. In the Spring Framework, the logout-success-url configuration parameter is used for these purposes, but any attempts to enter it through env have been unsuccessful. Am I doing something wrong, or is such redirection not provided after logout?

Expected behavior

When you click on logout, logout occurs and returns to the kafka-ui home page.

Your installation details

Authorization parameters: AUTH_TYPE: OAUTH2 AUTH_OAUTH2_CLIENT_KEYCLOAK_PROVIDER: keycloak AUTH_OAUTH2_CLIENT_KEYCLOAK_ISSUER_URI: <ISSUER_URI> AUTH_OAUTH2_CLIENT_KEYCLOAK_REDIRECT_URL: https://<domain.com>/kafka-ui AUTH_OAUTH2_CLIENT_KEYCLOAK_USER_NAME_ATTRIBUTE: preferred_username AUTH_OAUTH2_CLIENT_KEYCLOAK_SCOPE: openid AUTH_OAUTH2_CLIENT_KEYCLOAK_CUSTOM-PARAMS_TYPE: keycloak AUTH_OAUTH2_CLIENT_KEYCLOAK_CLIENTID: <CLIENTID> AUTH_OAUTH2_CLIENT_KEYCLOAK_CLIENTSECRET: <CLIENTSECRET>

There were also many options to add LOGOUT_SUCCESS_URL directly or through CUSTOM-PARAMS

Steps to reproduce

  1. install kafka-ui with the current specified parameters
  2. log in using oauth2 via keycloak
  3. Click on logout and confirm in the window that opens Remains on the keycloak endpoint and does not go back

Screenshots

No response

Logs

No response

Additional context

No response

AlexeyGA avatar Oct 03 '23 18:10 AlexeyGA

We have the same issue, indeed it would lovely to have this feature

devlifealways avatar Dec 07 '23 16:12 devlifealways

logout success url is an URL within the app to get the user redirected to, which defaults to /login?logout in this case. The thing you're looking for is called a post-logout url, and it has to be set up on the Keycloak's side, there's a param called post_logout_redirect_uri.

Haarolean avatar Feb 01 '24 13:02 Haarolean