-
Notifications
You must be signed in to change notification settings - Fork 165
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
[BUG] Opensearch-dashboards logout not working when logout is initiated from keycloak #840
Comments
Any updates on this issue? Support is needed for keycloak-initiated logouts. |
Any updates on this issue and if this bug would be addressed in upcoming versions of opensearch dashboards? This is a major issue blocking single-signout functionality of keycloak IdP. |
AFAIK nobody is working on this, if someone wants to pick it up we’d be glad to help, please contribute |
+1 |
Hi, Is there a plan to fix this issue with single-sign out? |
+1 |
Hi, There was a configuration mistake in my earlier validations done for 2.9.0, so its possible that the issue was not there in that version too. |
Thanks for circling back with your findings, @aggarwalShivani! I'm closing this, we can re-open if new reports come in. |
Little out of topic. I am getting below error in keycloak, while sending backchannel logout to opensearch-dashboard Thanks in advance |
Hi @Jayashree-Rajendran, But yes, I also had faced exactly the same ssl-handshake error. To bypass the keycloak error, I had disabled SSL on Opensearch-dashboards (so it was accessible on HTTP), while security(authentication/authorization) was still enabled. |
Oh ok. |
Not sure if I understood your question. I had only disabled SSL on OSD, to bypass the cert-validation error keycloak was throwing while performing backchannel logouts. |
Describe the bug
( Recreating bug in opensearch project as same issue would be observed as with opendistro - opendistro-for-elasticsearch/security-kibana-plugin#17)
Issue: Opensearch-dashboards logout not working with single-sign out and with OP (keycloak) initiated logout.
Scenario -
Opensearch-dashboards is installed with openid_auth enabled. If we login to Opensearch-dashboards and logout from it, it works fine.
However, if we login to the Opensearch-dashboards UI (say as testuser) and then logout/terminate the active sessions of this user from keycloak admin console, keycloak does not show any active sessions for the user, however, Opensearch-dashboards UI does not logout, stays logged in and remains accessible.
Only (a) if we explicitly log out from Opensearch-dashboards UI by clicking on its logout button or
(b) if we delete the security_authentication cookies created by Opensearch-dashboards in the browser,
only then Opensearch-dashboards logs out and redirects to authentication page.
Tried two approaches :
Configuring opensearch_security.openid.logout_url:
opensearch_security.openid.logout_url | The logout URL of your IdP. Optional. Only necessary if your IdP does not publish the logout URL in its metadata.
The metadata endpoint url of my keycloak server does publish the end_session_endpoint" as https://{{ip}}/auth/realms//protocol/openid-connect/logout".
As per the document, tried explicitly configuring:
opensearch_security.openid.logout_url: https://{{ip}}/auth/realms/{{realm}}/protocol/openid-connect/logout ,
but this did not help.
Configuring Backchannel Logout URL for the client in keycloak
As per keycloak, Backchannel logout url is URL that will cause the client to log itself out when a logout request is sent to this realm (via end_session_endpoint). If omitted, no logout request will be sent to the client in this case.
Configured the backchannel logout url as opensearch-dashboards logout url
i.e. backchannel logout url: https://{{Opensearch-dashboards:5601}}/api/v1/auth/logout
With this too, the behaviour remains same and Opensearch-dashboards does not log out.
Kibana logs on clicking logout from keycloak admin console:
{"type":"response","@timestamp":"2021-10-27T08:38:36Z","tags":[],"pid":10,"method":"post","statusCode":400,"req":{"url":"/api/v1/auth/logout","method":"post","headers":{"content-length":"859","content-type":"application/x-www-form-urlencoded; charset=UTF-8","host":"w.x.y.z:30603","connection":"Keep-Alive","user-agent":"Apache-HttpClient/4.5.13 (Java/11.0.12)","accept-encoding":"gzip,deflate"},"remoteAddress":"w.x.y.z","userAgent":"w.x.y.z"},"res":{"statusCode":400,"responseTime":17,"contentLength":9},"message":"POST /api/v1/auth/logout 400 17ms - 9.0B"}
This is a major bug in Opensearch-dashboards security openid_auth authentication.
Any ideas on the root cause and how this can be mitigated?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After terminating session for the user from keycloak admin console, the opensearch-dashboards UI should have automatically logged out.
The text was updated successfully, but these errors were encountered: