-
Notifications
You must be signed in to change notification settings - Fork 187
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
SAML logout/session renewal bugs #4595
Comments
I've been working on this issue. |
Behavior seen using OpenSearch 2.3After applying the proper configurations, this is what can be expected from the SAML integration. The tests were done using Scenario 1: The user wants to log offIf the user wants to log off, it can click on the Grabacion.de.pantalla.desde.29-09-22.15.18.29.movScenario 2. The user is logged off by IDPOpenSearch doesn't currently support backend logout, and doesn't verify the validity of the session on every transaction. That means that even if the session is ended by the IDP, the user will still be able to navigate and use the dashboard without any limitations. Possible workaroundsThe default session time is 1h. However, it can be manually changed using the The cons of this approach are the next:
|
Tested OpenDistro Environments, changing the different available settings. Analyzing the behaviour on different situations with different configurations, we got the following conclusions:
|
Tested OpenSearch Environments, changing the different available settings. Analyzing the behavior on different situations with different configurations, we got the following conclusions:
Additional discoveries
Notes about this
If the first step of this process occurs when the user is inside the Wazuh plugin, the last step will not contain any cookie on the request header. That will cause not having any Analyzing the request sent to The code for the routes Further troubleshooting concluded that the reason for the cookie to not be present on the last request is that, for some reason, there are requests in between the login and the ACS that invalidates the cookie. This behavior is only observer on the Wazuh plugin. It isn't always the same request that causes the error, however, there are lots of requests done each time the Wazuh plugin is accessed. |
ResearchI was researching the workflow to authenticate the user and could replicate the problem with the suggestions of @Tostti . Moreover, I was reviewing the source code of the security plugin with @asteriscos and @yenienserrano. |
Analysis of the issueThe issue happens in OpenDistro and also in Opensearch. It is not possible to validate the cookie from the code, as it is I have been investigating the origin of the requests when the user navigates to or inside the plugin. There are different origins, based on the required window. These are the ones found at the time:
Analyzing other plugins, usually there are not any request made on the mounting of the component. Additionally, the requests made to access the different pages are usually done inside of the views. |
UpdateI was researching and found that the security plugin adds an interceptor to request service For X-Pack could have a similar behavior: https://github.com/elastic/kibana/blob/v7.17.5/x-pack/plugins/security/public/plugin.tsx#L84 SolutionCentralize the requests done to a unique service used by the plugin and uses the request service served by the platform, that contains the interceptor. List of services:
|
ResearchThe
The proposed solution is the plugin uses a request service that wraps the There are some things in the current implementation that we should resolve how to do it:
Tasks
|
All related issues were successfully closed |
Description
The SAML integration is failing in wazuh-dashboards when a user tries to log off or when the SAML IDP sends a logout message.
Preconditions
Have a SAML IDP in place and Wazuh configured to use it as an auth mechanism
Steps to reproduce
Scenario 1: The user wants to log off
Scenario 2. The user is logged off by IDP
Expected Result
Actual Result
Additional context
We need to design a workaround until this issue is fixed in the base platform.
Related issues
We have discovered two bugs:
OpenSearch issues:
The text was updated successfully, but these errors were encountered: