Skip to content

Comments

[AI4DSOC] Fix cases capability used in Security navbar#222504

Merged
tomsonpl merged 4 commits intoelastic:mainfrom
tomsonpl:fix-cases-nav
Jun 6, 2025
Merged

[AI4DSOC] Fix cases capability used in Security navbar#222504
tomsonpl merged 4 commits intoelastic:mainfrom
tomsonpl:fix-cases-nav

Conversation

@tomsonpl
Copy link
Contributor

@tomsonpl tomsonpl commented Jun 4, 2025

Fix the issue where Security Section was not displayed.

Closes: #221573

Screenshot 2025-06-04 at 09 42 05

@tomsonpl tomsonpl self-assigned this Jun 4, 2025
@tomsonpl
Copy link
Contributor Author

tomsonpl commented Jun 4, 2025

/ci

@tomsonpl tomsonpl added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.1.0 v8.19.0 labels Jun 4, 2025
if (!hasAccessToSecuritySolution(capabilities)) {
if (
!hasAccessToSecuritySolution(capabilities) &&
!capabilities.securitySolutionCasesV3?.read_cases
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to revert this change, because of an edge case where redirect to cases takes place:

if (hasAccessToSecuritySolution(capabilities)) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Caught by this test:

it('RedirectRoute should redirect to cases page when siem privilege is none and case privilege is read', () => {

@tomsonpl
Copy link
Contributor Author

tomsonpl commented Jun 4, 2025

/ci

@tomsonpl tomsonpl requested a review from semd June 4, 2025 13:36
@tomsonpl tomsonpl marked this pull request as ready for review June 4, 2025 13:36
@tomsonpl tomsonpl requested a review from a team as a code owner June 4, 2025 13:36
return Boolean(
// Using `siemV2`
capabilities[SECURITY_FEATURE_ID]?.show ||
capabilities.securitySolutionCasesV2?.read_cases ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just change securitySolutionCasesV2 by securitySolutionCasesV3, instead of doing the cases check outside?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can't without changing the behavior. The redirect would get into the /get_started page instead of /cases here:

if (hasAccessToSecuritySolution(capabilities)) {

Copy link
Contributor

Choose a reason for hiding this comment

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

@tomsonpl Oh, good point.
Then would you mind creating different functions, with a clear naming, because this is a bit confusing right now. We could have:

  • hasSecurityAccess -> security || attack-discovery (used in app_routes)
  • hasCasesAccess -> cases (used in app_routes)
  • isSecuritySolutionAccessible -> hasSecurityAccess() || hasCasesAccess() (used in the plugin.tsx)

And consider using CASES_FEATURE_ID instead of hardcoding the version.

Question: Should we consider letting users access Security if they only have the assistant feature? Maybe it should be part of hasSecurityAccess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, changed it as you suggested 👍 I'll get this assistant question back to the team

Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

❤️ Love it. Thanks @tomsonpl
LGTM!

@tomsonpl tomsonpl enabled auto-merge (squash) June 6, 2025 09:04
@tomsonpl tomsonpl merged commit 60fc93c into elastic:main Jun 6, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

@elasticmachine
Copy link
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 9.3MB 9.3MB -7.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 93.2KB 93.2KB +64.0B

History

cc @tomsonpl

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [Cloud Security] Add Fleet Extensions for Cloud Asset Discovery to Enable Custom Onboarding UI (#219001)
- [AI4SOC] AI settings page (#217373)

Manual backport

To create the backport manually run:

node scripts/backport --pr 222504

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 10, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

pmuellr pushed a commit to pmuellr/kibana that referenced this pull request Jun 11, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

21 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 222504 locally
cc: @tomsonpl

@tomsonpl tomsonpl added backport:skip This PR does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels labels Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security Solution] Link to the security solution is not shown

4 participants