# Open Redirect in/auth/realms/\[REALM\]/protocol/openid-connect/logout

**URL:** <https://forum.keycloak.org/t/open-redirect-in-auth-realms-realm-protocol-openid-connect-logout/6108>\
**Category:** Securing applications\
**Created:** [November 25, 2020, 4:39pm UTC](https://forum.keycloak.org/t/open-redirect-in-auth-realms-realm-protocol-openid-connect-logout/6108 "2020-11-25T16:39:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sleroux3386](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@sleroux3386](https://forum.keycloak.org/u/sleroux3386)\
**Post date:** [November 25, 2020, 4:39pm UTC](https://forum.keycloak.org/t/open-redirect-in-auth-realms-realm-protocol-openid-connect-logout/6108/1 "2020-11-25T16:39:55Z")

</div>

When using the openid logout, the client\_id is not used (it’s possible to logout without client\_id).

Which client is used (a default one? ) ?. Is it possible to validate the redirect\_url against something?

---

<div class="post-metadata">

**Author:** ![hannahshort](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/hannahshort/32/3122_2.png) [@hannahshort](https://forum.keycloak.org/u/hannahshort)\
**Post date:** [May 12, 2021, 2:04pm UTC](https://forum.keycloak.org/t/open-redirect-in-auth-realms-realm-protocol-openid-connect-logout/6108/2 "2021-05-12T14:04:00Z")

</div>

No solution to offer but we were alerted to this security hole as well. Is it possible to authenticate the logout request? Or, as @sleroux3386 suggests, validate the redirect url against a whitelist?

---

<div class="post-metadata">

**Author:** ![weltonrodrigo](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/weltonrodrigo/32/3104_2.png) [@weltonrodrigo](https://forum.keycloak.org/u/weltonrodrigo)\
**Post date:** [November 22, 2021, 9:44pm UTC](https://forum.keycloak.org/t/open-redirect-in-auth-realms-realm-protocol-openid-connect-logout/6108/3 "2021-11-22T21:44:02Z")

</div>

There is no need for a client\_id on the logout exchange because you don’t need to. This is called central logout and will remove your keycloak session.

This will not guarantee that other clients (besides the one that actually initiated the logout) will be aware of that logout. They must provide a logout endpoint which keycloak (keycloak server itself, not the user browser) can do a http request against to inform your application that the user session is to be revoked. You configure that url on “Backchannel Logout URL” field of client configuration and keycloak can give your application the user’s (keycloak) session id if you choose “Backchannel Logout Session Required”.

Keycloak will only logout users with valid session cookies. So you cannot logout another user.

Keycloak will only redirect users to your `redirect_url` after logout with that url is listed in any client `redirect_url` list.
