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

OAuth 2: support logout when using IDP-initiated flows #12545

Open
MarcialRosales opened this issue Oct 18, 2024 · 0 comments
Open

OAuth 2: support logout when using IDP-initiated flows #12545

MarcialRosales opened this issue Oct 18, 2024 · 0 comments

Comments

@MarcialRosales
Copy link
Contributor

MarcialRosales commented Oct 18, 2024

Describe the bug

This issue occurs when using idp-initiated configuration. This issue was found when testing oauth2-proxy example (https://rabbitmq.com/docs/oauth2-examples-proxy).

Reproduction steps

  1. Go to oauth2-proxy root url
  2. You are redirected to keycloak to login
  3. Upon successful logon, you are redirected to rabbitmq
  4. Click on logout
  5. You are wrongly redirected again back to RabbitMQ

Expected behavior

If end_session_endpoint is configured you should be redirected to that endpoint else to the management.oauth_provider_url.

If you are using oauth2-proxy, the /oauth2/sign_out is the logout endpoint. It removes the cookie associated to the authenticated oauth2-proxy user. However, you can pass a query parameter, rd, with the url for the identity provider to logout the user also from it. This is the configuration used in the oauth2-proxy example that configures the end_session_endpoint.

auth_oauth2.issuer = https://keycloak:8443/realms/test
auth_oauth2.end_session_endpoint = https://localhost:8442/oauth2/sign_out?rd=https://keycloak:8443/realms/test/protocol/openid-connect/logout

Additional context

No response

@MarcialRosales MarcialRosales self-assigned this Oct 18, 2024
@michaelklishin michaelklishin changed the title Support OpenId Logout flow when using Idp-initiated flows OpenID: support logout when using IDP-initiated flows Oct 18, 2024
@michaelklishin michaelklishin changed the title OpenID: support logout when using IDP-initiated flows OAuth 2: support logout when using IDP-initiated flows Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant