Skip to content

Comments

[AI4DSOC] Hide security solution pages#219081

Merged
ashokaditya merged 28 commits intoelastic:mainfrom
tomsonpl:ai-soc-dashboards
May 7, 2025
Merged

[AI4DSOC] Hide security solution pages#219081
ashokaditya merged 28 commits intoelastic:mainfrom
tomsonpl:ai-soc-dashboards

Conversation

@tomsonpl
Copy link
Contributor

@tomsonpl tomsonpl commented Apr 24, 2025

Summary

This PR implements a mechanism to control visibility and access to Security Solution pages based on user access and PLIs.
It replaces direct usage of the SecurityRoutePageWrapper component with the withSecurityRoutePageWrapper higher-order component across multiple route files in the Security Solution plugin.

Changes

  • Added cloudSecurityPosture entry to the SecurityPageName enum in deep_links.ts
  • Replaced direct usage of SecurityRoutePageWrapper with withSecurityRoutePageWrapper HOC in:
Route Complete AiSoc Comments
Asset Inventory routes OK Redirected to /get_started
Assets routes OK OK Should we hide this one?
Cloud Security Posture Redirected to /get_started Redirected to /get_started Redirected if there's no 'Cloud' Addon (even on Complete)
Dashboards routes OK Redirected to /get_started
Exceptions routes OK Upselling Upselling has priority over redirection
Explore routes OK Redirected to /get_started
Investigations routes OK Redirected to /get_started
Notes routes OK Not Working Should be redirected to get_started - TBC...
Overview routes OK Redirected to /get_started
Timelines routes OK Redirected to /get_started

Question:

Screenshot 2025-04-24 at 15 20 52 Without `Cloud` Add-on - should we hide the cloud cards ? Eg. in `Complete` tier?

Technical Details

The withSecurityRoutePageWrapper HOC provides a consistent way to handle authorization, redirects, and page visibility across the Security Solution.
This approach allows for more granular control over which pages are accessible based on user permissions and subscription tier, particularly important for the AI for SOC functionality.

Testing

  • Verified that all Security Solution pages properly respect user permissions
  • Confirmed that unauthorized users are redirected appropriately

Closes: https://github.com/elastic/security-team/issues/12401

@tomsonpl tomsonpl self-assigned this Apr 24, 2025
@tomsonpl
Copy link
Contributor Author

/ci

@tomsonpl
Copy link
Contributor Author

/ci

@tomsonpl
Copy link
Contributor Author

/ci

@tomsonpl
Copy link
Contributor Author

/ci

@ashokaditya ashokaditya self-assigned this Apr 25, 2025
@ashokaditya ashokaditya added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Defend Workflows “EDR Workflows” sub-team of Security Solution OLM Sprint Team:Security Generative AI Security Generative AI v9.1.0 labels Apr 25, 2025
@ashokaditya
Copy link
Member

/ci

@ashokaditya
Copy link
Member

/ci

1 similar comment
@ashokaditya
Copy link
Member

/ci

@ashokaditya ashokaditya marked this pull request as ready for review April 29, 2025 13:05
@ashokaditya ashokaditya requested review from a team as code owners April 29, 2025 13:05
@ashokaditya ashokaditya merged commit 0a5120b into elastic:main May 7, 2025
9 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #115 / Cloud Security Posture Findings Page - Alerts "before each" hook for "Creates a detection rule from the Take Action button and navigates to rule page"
  • [job] [logs] FTR Configs #123 / Visualizations - Group 3 lens app - TSVB Open in Lens Table should convert color ranges

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.1MB 9.1MB -217.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 88.0KB 88.0KB -33.0B

History

cc @ashokaditya @tomsonpl

akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
## Summary

This PR implements a mechanism to control visibility and access to
Security Solution pages based on user access and PLIs.
It replaces direct usage of the `SecurityRoutePageWrapper` component
with the `withSecurityRoutePageWrapper` higher-order component across
multiple route files in the Security Solution plugin.

## Changes

- Added `cloudSecurityPosture` entry to the `SecurityPageName` enum in
`deep_links.ts`
- Replaced direct usage of `SecurityRoutePageWrapper` with
`withSecurityRoutePageWrapper` HOC in:


| Route | Complete | AiSoc | Comments |

|-------------------------|----------|--------------------------------|----------------------|
| Asset Inventory routes | OK | Redirected to /get_started | |
| Assets routes | OK | OK | Should we hide this one? |
| Cloud Security Posture | Redirected to /get_started | Redirected to
/get_started | Redirected if there's no 'Cloud' Addon (even on Complete)
|
| Dashboards routes | OK | Redirected to /get_started | |
| Exceptions routes | OK | Upselling | Upselling has priority over
redirection |
| Explore routes | OK | Redirected to /get_started | |
| Investigations routes | OK | Redirected to /get_started | |
| Notes routes | OK | Not Working | Should be redirected to get_started
- TBC... |
| Overview routes | OK | Redirected to /get_started | |
| Timelines routes | OK | Redirected to /get_started | |


## Question: 
<img width="1227" alt="Screenshot 2025-04-24 at 15 20 52"
src="https://github.com/user-attachments/assets/a57936b9-e954-43d8-a6d0-caf31508461c"
/>
Without `Cloud` Add-on - should we hide the cloud cards ? Eg. in
`Complete` tier?


## Technical Details

The `withSecurityRoutePageWrapper` HOC provides a consistent way to
handle authorization, redirects, and page visibility across the Security
Solution.
This approach allows for more granular control over which pages are
accessible based on user permissions and subscription tier, particularly
important for the **AI for SOC** functionality.

## Testing

- Verified that all Security Solution pages properly respect user
permissions
- Confirmed that unauthorized users are redirected appropriately

Closes: elastic/security-team#12401

---------

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
Co-authored-by: Ashokaditya <ashokaditya@elastic.co>
qn895 pushed a commit to qn895/kibana that referenced this pull request Jun 3, 2025
## Summary

This PR implements a mechanism to control visibility and access to
Security Solution pages based on user access and PLIs.
It replaces direct usage of the `SecurityRoutePageWrapper` component
with the `withSecurityRoutePageWrapper` higher-order component across
multiple route files in the Security Solution plugin.

## Changes

- Added `cloudSecurityPosture` entry to the `SecurityPageName` enum in
`deep_links.ts`
- Replaced direct usage of `SecurityRoutePageWrapper` with
`withSecurityRoutePageWrapper` HOC in:


| Route | Complete | AiSoc | Comments |

|-------------------------|----------|--------------------------------|----------------------|
| Asset Inventory routes | OK | Redirected to /get_started | |
| Assets routes | OK | OK | Should we hide this one? |
| Cloud Security Posture | Redirected to /get_started | Redirected to
/get_started | Redirected if there's no 'Cloud' Addon (even on Complete)
|
| Dashboards routes | OK | Redirected to /get_started | |
| Exceptions routes | OK | Upselling | Upselling has priority over
redirection |
| Explore routes | OK | Redirected to /get_started | |
| Investigations routes | OK | Redirected to /get_started | |
| Notes routes | OK | Not Working | Should be redirected to get_started
- TBC... |
| Overview routes | OK | Redirected to /get_started | |
| Timelines routes | OK | Redirected to /get_started | |


## Question: 
<img width="1227" alt="Screenshot 2025-04-24 at 15 20 52"
src="https://github.com/user-attachments/assets/a57936b9-e954-43d8-a6d0-caf31508461c"
/>
Without `Cloud` Add-on - should we hide the cloud cards ? Eg. in
`Complete` tier?


## Technical Details

The `withSecurityRoutePageWrapper` HOC provides a consistent way to
handle authorization, redirects, and page visibility across the Security
Solution.
This approach allows for more granular control over which pages are
accessible based on user permissions and subscription tier, particularly
important for the **AI for SOC** functionality.

## Testing

- Verified that all Security Solution pages properly respect user
permissions
- Confirmed that unauthorized users are redirected appropriately

Closes: elastic/security-team#12401

---------

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
Co-authored-by: Ashokaditya <ashokaditya@elastic.co>
@ashokaditya ashokaditya added backport:version Backport to applied version labels v8.19.0 and removed backport:skip This PR does not require backporting labels Jun 6, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

@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:
- [AI4DSOC] Change rules and alerts capabilities (#215148)

Manual backport

To create the backport manually run:

node scripts/backport --pr 219081

Questions ?

Please refer to the Backport tool documentation

1 similar comment
@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:
- [AI4DSOC] Change rules and alerts capabilities (#215148)

Manual backport

To create the backport manually run:

node scripts/backport --pr 219081

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 9, 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 219081 locally
cc: @ashokaditya

4 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 219081 locally
cc: @ashokaditya

@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 219081 locally
cc: @ashokaditya

@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 219081 locally
cc: @ashokaditya

@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 219081 locally
cc: @ashokaditya

@tomsonpl
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

tomsonpl added a commit to tomsonpl/kibana that referenced this pull request Jun 16, 2025
## Summary

This PR implements a mechanism to control visibility and access to
Security Solution pages based on user access and PLIs.
It replaces direct usage of the `SecurityRoutePageWrapper` component
with the `withSecurityRoutePageWrapper` higher-order component across
multiple route files in the Security Solution plugin.

## Changes

- Added `cloudSecurityPosture` entry to the `SecurityPageName` enum in
`deep_links.ts`
- Replaced direct usage of `SecurityRoutePageWrapper` with
`withSecurityRoutePageWrapper` HOC in:

| Route | Complete | AiSoc | Comments |

|-------------------------|----------|--------------------------------|----------------------|
| Asset Inventory routes | OK | Redirected to /get_started | |
| Assets routes | OK | OK | Should we hide this one? |
| Cloud Security Posture | Redirected to /get_started | Redirected to
/get_started | Redirected if there's no 'Cloud' Addon (even on Complete)
|
| Dashboards routes | OK | Redirected to /get_started | |
| Exceptions routes | OK | Upselling | Upselling has priority over
redirection |
| Explore routes | OK | Redirected to /get_started | |
| Investigations routes | OK | Redirected to /get_started | |
| Notes routes | OK | Not Working | Should be redirected to get_started
- TBC... |
| Overview routes | OK | Redirected to /get_started | |
| Timelines routes | OK | Redirected to /get_started | |

## Question:
<img width="1227" alt="Screenshot 2025-04-24 at 15 20 52"
src="https://github.com/user-attachments/assets/a57936b9-e954-43d8-a6d0-caf31508461c"
/>
Without `Cloud` Add-on - should we hide the cloud cards ? Eg. in
`Complete` tier?

## Technical Details

The `withSecurityRoutePageWrapper` HOC provides a consistent way to
handle authorization, redirects, and page visibility across the Security
Solution.
This approach allows for more granular control over which pages are
accessible based on user permissions and subscription tier, particularly
important for the **AI for SOC** functionality.

## Testing

- Verified that all Security Solution pages properly respect user
permissions
- Confirmed that unauthorized users are redirected appropriately

Closes: elastic/security-team#12401

---------

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
Co-authored-by: Ashokaditya <ashokaditya@elastic.co>
(cherry picked from commit 0a5120b)

# Conflicts:
#	x-pack/solutions/security/plugins/security_solution/public/asset_inventory/links.ts
#	x-pack/solutions/security/plugins/security_solution/public/asset_inventory/routes.tsx
#	x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/routes.tsx
#	x-pack/solutions/security/plugins/security_solution/public/rules/routes.tsx
#	x-pack/test/security_solution_cypress/cypress/e2e/ai4dsoc/navigation/navigation.cy.ts
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @ashokaditya

5 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @ashokaditya

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @ashokaditya

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @ashokaditya

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @ashokaditya

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @ashokaditya

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels OLM Sprint release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Security Generative AI Security Generative AI v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.