Skip to content
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

OidcBackChannelLogoutHandler#logoutUrl not configurable, context path missing from default #15067

Closed
JuergenSimon opened this issue May 13, 2024 · 2 comments
Labels
status: waiting-for-triage An issue we've not yet triaged type: bug A general bug

Comments

@JuergenSimon
Copy link

Describe the bug

  • When logging out using backchannel-logout, the OidcBackChannelLogoutHandler handles this by generating logout requests to localhost
  • The URL generated is http://localhost/logout, but this skips the context path. As a result, this runs into a 404
  • Given an application with context path /my-application, I would expect: http://localhost/my-application/logout
  • It also seems to fail if the logoutUrl was configured to something else than /logout

To Reproduce

  • Set up an application with back-channel logout on keycloak
  • Set up keycloak with debug logging
  • Log out by terminating the session on key cloak

Expected behavior

  • The internally generated log-out does not produce a 404

Proposals

  • A) Make the feature aware of the context path
  • B) Make the feature respect reconfiguration of logoutUrl
  • C) Instead of generating internal requests, use the API to terminate the session
@JuergenSimon JuergenSimon added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels May 13, 2024
@lmorocz
Copy link

lmorocz commented May 16, 2024

It is configurable since 6.2.4, see #14679 (and #14609).

eg. .oidcLogout(lc -> lc.backChannel(c -> c.logoutUri("{baseScheme}://{baseHost}{basePort}{basePath}/logout"))))

@JuergenSimon
Copy link
Author

I was still debugging against the 6.2.3 version. I can confirm that with an upgrade to 6.2.4, it works as advertised. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants