Skip to content

[Security Solution] [Alerts] Fix deprecated pageNames with redirects#232558

Merged
kqualters-elastic merged 2 commits intoelastic:mainfrom
kqualters-elastic:fix-action-redirects
Aug 25, 2025
Merged

[Security Solution] [Alerts] Fix deprecated pageNames with redirects#232558
kqualters-elastic merged 2 commits intoelastic:mainfrom
kqualters-elastic:fix-action-redirects

Conversation

@kqualters-elastic
Copy link
Copy Markdown
Contributor

@kqualters-elastic kqualters-elastic commented Aug 21, 2025

Summary

Related issue: #232557

This pr fixes an issue where deprecated pages that are not registered with the global navigation and search, as the now deprecated app/security/detections/* routes are, but did have custom redirect logic with react router components, stopped working as a result of a recent change #217890 that prevented any of this logic from running if the route was not registered globally, "useLinkInfo" is the hook below that checks this. Alert actions use an older url, app/security/detections/rules/id/{ruleId}, and redirect at the application level to the new url app/security/rules/id/{ruleId} and so this pr explicitly excludes the old route from this check, because we should also continue to not show a detections result in the global search bar that just redirects to the alerts page. Open to doing this in another way if we want, but this seemed the most direct and lowest friction way to make this core functionality work again.

Before:
fix_action_redirects_busted

After:
fix_action_redirects

Checklist

Copy link
Copy Markdown
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@kqualters-elastic kqualters-elastic enabled auto-merge (squash) August 25, 2025 06:43
@kqualters-elastic kqualters-elastic merged commit c4d6fba into elastic:main Aug 25, 2025
12 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.0, 9.1

https://github.com/elastic/kibana/actions/runs/17204356821

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 10.4MB 10.4MB +33.0B

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 25, 2025
…lastic#232558)

## Summary

Related issue: elastic#232557

This pr fixes an issue where deprecated pages that are not registered
with the global navigation and search, as the now deprecated
app/security/detections/* routes are, but did have custom redirect logic
with react router components, stopped working as a result of a recent
change elastic#217890 that prevented any
of this logic from running if the route was not registered globally,
"useLinkInfo" is the hook below that checks this. Alert actions use an
older url, app/security/detections/rules/id/{ruleId}, and redirect at
the application level to the new url app/security/rules/id/{ruleId} and
so this pr explicitly excludes the old route from this check, because we
should also continue to not show a detections result in the global
search bar that just redirects to the alerts page. Open to doing this in
another way if we want, but this seemed the most direct and lowest
friction way to make this core functionality work again.

Before:

![fix_action_redirects_busted](https://github.com/user-attachments/assets/5f74b5ae-66e3-4590-8ee5-6d1f6c6fbe34)

After:

![fix_action_redirects](https://github.com/user-attachments/assets/98a8ab29-5c55-4c2f-972c-1dcf484441e6)

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit c4d6fba)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 232558

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Aug 25, 2025
…rects (#232558) (#232748)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Security Solution] [Alerts] Fix deprecated pageNames with redirects
(#232558)](#232558)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Qualters","email":"56408403+kqualters-elastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-08-25T09:05:19Z","message":"[Security
Solution] [Alerts] Fix deprecated pageNames with redirects
(#232558)\n\n## Summary\n\nRelated issue:
https://github.com/elastic/kibana/issues/232557\n\nThis pr fixes an
issue where deprecated pages that are not registered\nwith the global
navigation and search, as the now deprecated\napp/security/detections/*
routes are, but did have custom redirect logic\nwith react router
components, stopped working as a result of a recent\nchange
#217890 that prevented any\nof
this logic from running if the route was not registered
globally,\n\"useLinkInfo\" is the hook below that checks this. Alert
actions use an\nolder url, app/security/detections/rules/id/{ruleId},
and redirect at\nthe application level to the new url
app/security/rules/id/{ruleId} and\nso this pr explicitly excludes the
old route from this check, because we\nshould also continue to not show
a detections result in the global\nsearch bar that just redirects to the
alerts page. Open to doing this in\nanother way if we want, but this
seemed the most direct and lowest\nfriction way to make this core
functionality work
again.\n\nBefore:\n\n![fix_action_redirects_busted](https://github.com/user-attachments/assets/5f74b5ae-66e3-4590-8ee5-6d1f6c6fbe34)\n\n\nAfter:\n\n![fix_action_redirects](https://github.com/user-attachments/assets/98a8ab29-5c55-4c2f-972c-1dcf484441e6)\n\n\n###
Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"c4d6fbace44838293a553e9ac40ba0db9db8cc15","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:version","v9.2.0","v9.1.3","v8.19.3","v9.0.6"],"title":"[Security
Solution] [Alerts] Fix deprecated pageNames with
redirects","number":232558,"url":"https://github.com/elastic/kibana/pull/232558","mergeCommit":{"message":"[Security
Solution] [Alerts] Fix deprecated pageNames with redirects
(#232558)\n\n## Summary\n\nRelated issue:
https://github.com/elastic/kibana/issues/232557\n\nThis pr fixes an
issue where deprecated pages that are not registered\nwith the global
navigation and search, as the now deprecated\napp/security/detections/*
routes are, but did have custom redirect logic\nwith react router
components, stopped working as a result of a recent\nchange
#217890 that prevented any\nof
this logic from running if the route was not registered
globally,\n\"useLinkInfo\" is the hook below that checks this. Alert
actions use an\nolder url, app/security/detections/rules/id/{ruleId},
and redirect at\nthe application level to the new url
app/security/rules/id/{ruleId} and\nso this pr explicitly excludes the
old route from this check, because we\nshould also continue to not show
a detections result in the global\nsearch bar that just redirects to the
alerts page. Open to doing this in\nanother way if we want, but this
seemed the most direct and lowest\nfriction way to make this core
functionality work
again.\n\nBefore:\n\n![fix_action_redirects_busted](https://github.com/user-attachments/assets/5f74b5ae-66e3-4590-8ee5-6d1f6c6fbe34)\n\n\nAfter:\n\n![fix_action_redirects](https://github.com/user-attachments/assets/98a8ab29-5c55-4c2f-972c-1dcf484441e6)\n\n\n###
Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"c4d6fbace44838293a553e9ac40ba0db9db8cc15"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/232558","number":232558,"mergeCommit":{"message":"[Security
Solution] [Alerts] Fix deprecated pageNames with redirects
(#232558)\n\n## Summary\n\nRelated issue:
https://github.com/elastic/kibana/issues/232557\n\nThis pr fixes an
issue where deprecated pages that are not registered\nwith the global
navigation and search, as the now deprecated\napp/security/detections/*
routes are, but did have custom redirect logic\nwith react router
components, stopped working as a result of a recent\nchange
#217890 that prevented any\nof
this logic from running if the route was not registered
globally,\n\"useLinkInfo\" is the hook below that checks this. Alert
actions use an\nolder url, app/security/detections/rules/id/{ruleId},
and redirect at\nthe application level to the new url
app/security/rules/id/{ruleId} and\nso this pr explicitly excludes the
old route from this check, because we\nshould also continue to not show
a detections result in the global\nsearch bar that just redirects to the
alerts page. Open to doing this in\nanother way if we want, but this
seemed the most direct and lowest\nfriction way to make this core
functionality work
again.\n\nBefore:\n\n![fix_action_redirects_busted](https://github.com/user-attachments/assets/5f74b5ae-66e3-4590-8ee5-6d1f6c6fbe34)\n\n\nAfter:\n\n![fix_action_redirects](https://github.com/user-attachments/assets/98a8ab29-5c55-4c2f-972c-1dcf484441e6)\n\n\n###
Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"c4d6fbace44838293a553e9ac40ba0db9db8cc15"}},{"branch":"9.1","label":"v9.1.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kevin Qualters <56408403+kqualters-elastic@users.noreply.github.com>
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
…lastic#232558)

## Summary

Related issue: elastic#232557

This pr fixes an issue where deprecated pages that are not registered
with the global navigation and search, as the now deprecated
app/security/detections/* routes are, but did have custom redirect logic
with react router components, stopped working as a result of a recent
change elastic#217890 that prevented any
of this logic from running if the route was not registered globally,
"useLinkInfo" is the hook below that checks this. Alert actions use an
older url, app/security/detections/rules/id/{ruleId}, and redirect at
the application level to the new url app/security/rules/id/{ruleId} and
so this pr explicitly excludes the old route from this check, because we
should also continue to not show a detections result in the global
search bar that just redirects to the alerts page. Open to doing this in
another way if we want, but this seemed the most direct and lowest
friction way to make this core functionality work again.

Before:

![fix_action_redirects_busted](https://github.com/user-attachments/assets/5f74b5ae-66e3-4590-8ee5-6d1f6c6fbe34)


After:

![fix_action_redirects](https://github.com/user-attachments/assets/98a8ab29-5c55-4c2f-972c-1dcf484441e6)


### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
KodeRad pushed a commit to KodeRad/kibana that referenced this pull request Aug 28, 2025
…lastic#232558)

## Summary

Related issue: elastic#232557

This pr fixes an issue where deprecated pages that are not registered
with the global navigation and search, as the now deprecated
app/security/detections/* routes are, but did have custom redirect logic
with react router components, stopped working as a result of a recent
change elastic#217890 that prevented any
of this logic from running if the route was not registered globally,
"useLinkInfo" is the hook below that checks this. Alert actions use an
older url, app/security/detections/rules/id/{ruleId}, and redirect at
the application level to the new url app/security/rules/id/{ruleId} and
so this pr explicitly excludes the old route from this check, because we
should also continue to not show a detections result in the global
search bar that just redirects to the alerts page. Open to doing this in
another way if we want, but this seemed the most direct and lowest
friction way to make this core functionality work again.

Before:

![fix_action_redirects_busted](https://github.com/user-attachments/assets/5f74b5ae-66e3-4590-8ee5-6d1f6c6fbe34)


After:

![fix_action_redirects](https://github.com/user-attachments/assets/98a8ab29-5c55-4c2f-972c-1dcf484441e6)


### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants