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

Fix routes resolvers circular redirections - infinite loop #4079

Merged
merged 4 commits into from Apr 29, 2022

Conversation

asteriscos
Copy link
Member

@asteriscos asteriscos commented Apr 21, 2022

Description

This PR fixes circular redirections in the router resolvers when a service failure, such as session expired or service unavailable, causes an exception and the app tries to recover itself by redirecting to health-check and/or settings to setup an API or show a blank-screen to display an error message.

This has been tested with 3 cases:

  • No Wazuh API is configured in wazuh.yml
  • Wazuh app is idle for more than an hour
  • Renaming kibana.yml to make the service unavailable once the app is already running

This closes #4028 and #3929

@asteriscos asteriscos linked an issue Apr 21, 2022 that may be closed by this pull request
2 tasks
@asteriscos asteriscos requested a review from a team April 21, 2022 17:45
@asteriscos asteriscos self-assigned this Apr 21, 2022
@asteriscos asteriscos added the 4.3 label Apr 21, 2022
@Mayons
Copy link

Mayons commented Apr 25, 2022

Testing in progress

@Mayons
Copy link

Mayons commented Apr 25, 2022

Test OK - On Kibana 7.10.2 with Xpack Security
Couldn't reproduce circular redirections on the app

@Mayons Mayons self-requested a review April 26, 2022 13:33
Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review: passed
Test: passed

Note: a changelog entry is missing.

@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 4.04% ( 1474 / 36512 )
Branches 1.61% ( 459 / 28465 )
Functions 2.98% ( 266 / 8925 )
Lines 4.09% ( 1426 / 34908 )

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test: ✔️
CR: ✔️

Copy link
Contributor

@matiasmoreno876 matiasmoreno876 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR OK ✅
TEST OK ✅

@matiasmoreno876 matiasmoreno876 merged commit 79ada9b into 4.3-7.10 Apr 29, 2022
@matiasmoreno876 matiasmoreno876 deleted the fix/circular-redirections-4028 branch April 29, 2022 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Circular re-directions - Infinite loop
5 participants