Skip to content

Commit 613e3e0

Browse files
github-actions[bot]Tostti
andauthoredOct 17, 2022
[Backport 4.4-7.16] Fix logout from Wazuh when SAML is enabled (#4689)
Fix logout from Wazuh when SAML is enabled (#4664) * change function to get the path programatically * Update changelog (cherry picked from commit c320b31) Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com>
1 parent 4eebd9a commit 613e3e0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ All notable changes to the Wazuh app project will be documented in this file.
2424
- Improved Agents Overview performance [#4363](https://github.com/wazuh/wazuh-kibana-app/pull/4363)
2525
- Fixed a bug where the Wazuh logo was used instead of the custom one [#4539](https://github.com/wazuh/wazuh-kibana-app/pull/4539)
2626
- Fixed rendering problems of the `Agent Overview` section in low resolutions [#4516](https://github.com/wazuh/wazuh-kibana-app/pull/4516)
27+
- Fixed issue when logging out from Wazuh when SAML is enabled [#4595](https://github.com/wazuh/wazuh-kibana-app/issues/4595)
2728

2829
## Wazuh v4.3.8 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4309
2930

‎public/app.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ app.run(['$rootElement', function ($rootElement) {
107107
// Add plugin help links as extension to plugin platform help menu
108108
addHelpMenuToAppChrome();
109109

110-
111-
const urlToLogout = getHttp().basePath.prepend('/logout');
112110

113111
// Bind deleteExistentToken on Log out component.
114112
$('.euiHeaderSectionItem__button, .euiHeaderSectionItemButton').on('mouseleave', function () {
@@ -119,14 +117,14 @@ app.run(['$rootElement', function ($rootElement) {
119117
// x-pack
120118
$('a:contains(Log out)').on('click', function (event) {
121119
// Override href's behaviour and navigate programatically
122-
// to '/logout' once the token has been deleted.
120+
// to the logout path once the token has been deleted.
123121
event.preventDefault();
124122
WzAuthentication.deleteExistentToken()
125123
.catch((err) => {
126124
console.error('[ERROR] - User token could not be deprecated - ', err);
127125
})
128126
.finally(() => {
129-
window.location = urlToLogout;
127+
window.location = event.currentTarget.href;
130128
});
131129
});
132130
});

0 commit comments

Comments
 (0)