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

Cannot log out when OpenID Connect is set up #4780

Closed
Tracked by #4779
zbalkan opened this issue Oct 31, 2022 · 4 comments
Closed
Tracked by #4779

Cannot log out when OpenID Connect is set up #4780

zbalkan opened this issue Oct 31, 2022 · 4 comments
Labels
type/bug Bug issue

Comments

@zbalkan
Copy link

zbalkan commented Oct 31, 2022

Wazuh Elastic Rev Security
4..9 Wazuh-Indexer N/A Basic
Browser
N/A

Description
When OIDC is set up, the logout action redirects to https://hostname/logout page without any redirection and actually logging out of OIDC provider. So, when a user logs in, there is no way to log out.

Preconditions

  1. Install Wazuh 4.3.9 using Wazuh-Indexer and Wazuh-Dashboard.
  2. Have a OIDC Provider, e.g. Keycloak.
  3. Set up OpenID Connect according to the documents OpenSearch documents.

Steps to reproduce

  1. Log in to Wazuh using OpenID Connect SSO.
  2. Click on 'Logout'

Expected Result

  1. Redirect to http://auth-server/auth/realms/{realm-name}/protocol/openid-connect/logout?redirect_uri=encodedRedirectUri, where encoded redirect URI is the encoded format of https://hostname/app/login: https%3A%2F%2Fhostname%2Fapp%2Flogin.
  2. Log out of the session by the use of redirection.
  3. Display Wazuh login page.

Actual Result

  1. Redirects to https://hostname/logout and gets HTTP 404 Not Found result.

Screenshots
image
Sample Wazuh SSO login screen using Keycloak

image
Logging out

image
Logout result
Additional context

  • There is a similar issue related to logout created in April.
  • When you look at the code for logging out, there is no mention of handling those kinds of requests.
@zbalkan zbalkan added the type/bug Bug issue label Oct 31, 2022
@gdiazlo
Copy link
Member

gdiazlo commented Oct 31, 2022

Thanks for reporting this @zbalkan we're fixing this also for SAML in #4779, I believe the same fix will apply to all the auth methods which differ from the internal one.

@zbalkan
Copy link
Author

zbalkan commented Oct 31, 2022

Hi @gdiazlo ,

I see that the related PR uses Keycloak. Will there be a Keycloak SSO documentation for SAML and OIDC?

@zbalkan
Copy link
Author

zbalkan commented Oct 31, 2022

Another question. Does the merged PR handles logout for Wazuh session or for SSO provider? Because the latter would mean that unintentionally, user can log out of the SSO provider.

@AlexRuiz7 AlexRuiz7 changed the title Cannout log out when OpenID Connect is set up Cannot log out when OpenID Connect is set up Nov 9, 2022
@AlexRuiz7
Copy link
Member

Solved together with #4779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
Development

No branches or pull requests

3 participants