-
Notifications
You must be signed in to change notification settings - Fork 186
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
Fix logout from Wazuh when SAML is enabled (4.3) #4815
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
1 task
|
Mayons95
approved these changes
Nov 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
chantal-kelm
approved these changes
Nov 7, 2022
github-actions bot
pushed a commit
that referenced
this pull request
Nov 7, 2022
* change function to get the path programatically * update changelog (cherry picked from commit 72ba21a)
github-actions bot
pushed a commit
that referenced
this pull request
Nov 7, 2022
* change function to get the path programatically * update changelog (cherry picked from commit 72ba21a)
AlexRuiz7
changed the title
change function to get the path programatically
Change function to get the path programmatically
Nov 9, 2022
AlexRuiz7
changed the title
Change function to get the path programmatically
Fix logout from Wazuh when SAML is enabled (4.3)
Nov 9, 2022
Opensearch with SAML saml.mp4 |
7 tasks
AlexRuiz7
added a commit
that referenced
this pull request
Nov 17, 2022
* [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com>
github-actions bot
pushed a commit
that referenced
this pull request
Nov 17, 2022
* [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com> (cherry picked from commit d0c9e91)
AlexRuiz7
added a commit
that referenced
this pull request
Nov 17, 2022
Post-release v4.3.10 (#4879) * [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com> (cherry picked from commit d0c9e91) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
AlexRuiz7
added a commit
that referenced
this pull request
Nov 17, 2022
* [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com> (cherry picked from commit d0c9e91)
AlexRuiz7
added a commit
that referenced
this pull request
Nov 17, 2022
* [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com> (cherry picked from commit d0c9e91)
AlexRuiz7
added a commit
that referenced
this pull request
Nov 17, 2022
* [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com> (cherry picked from commit d0c9e91)
chantal-kelm
pushed a commit
that referenced
this pull request
Nov 17, 2022
Post-release v4.3.10 (#4879) * [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com> (cherry picked from commit d0c9e91)
AlexRuiz7
added a commit
that referenced
this pull request
Nov 17, 2022
Post-release v4.3.10 (#4879) * [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com> (cherry picked from commit d0c9e91)
AlexRuiz7
added a commit
that referenced
this pull request
Nov 17, 2022
Post-release v4.3.10 (#4879) * [Backport 4.3-7.10] Create pull_request_template.md (#4591) Create pull_request_template.md (#4583) (cherry picked from commit aac7f22) Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com> * Bump 4.3.9 (#4655) * bump: Version v4.3.9-7.10.2 * bump: Version v4.3.9-7.10.2 * change function to get the path programatically (#4815) * change function to get the path programatically * update changelog * Add support for Wazuh 4.3.10 - 7.10.2 (#4839) Bump 4.3.10 * Fixed 4.3.10 changelog (#4845) Fixed changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com> (cherry picked from commit d0c9e91)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When SAML is enabled, the logout button inside the Wazuh plugin didn't work properly. That was because there is a function to remove the token before redirecting to logout, and the logout URL is different when SAML is enabled.
The solucion provided is to get the logout URL programatically from the logout anchor. That way, the issue is resolved and there is no need to modify anything in case that the logout URL changes in the future.
Issues Resolved
#4595
Evidence
Trying to log out from the Wazuh plugin before the changes:
Trying to log out from the Wazuh plugin after the changes (the user is correctly redirected to the idp login page):
Test
Scenario: have an environment with xPack
When the user opens the Wazuh plugin and clicks on log out
Then the session should be closed and the user redirected to the login page
Scenario: have an environment with OpenDistro
When the user opens the Wazuh plugin and clicks on log out
Then the session should be closed and the user redirected to the login page
Scenario: have an environment with OpenSearch
When the user opens the Wazuh plugin and clicks on log out
Then the session should be closed and the user redirected to the login page
Scenario: have an environment with SAML
When the user opens the Wazuh plugin and clicks on log out
Then the session should be closed and the user redirected to the login page
Check List
yarn test:jest