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

[AI4DSOC] Alert summary page routing and initialization #214889

Merged

Conversation

PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Mar 18, 2025

Summary

This PR is the setting the foundations for the AI for SOC Alert summary page. It has very little UI, instead it focuses on the following:

  • add routing for the alert_summary page
  • fetches the integrations, filters them to only keep the ones related to AI for SOC, then decides what to render depending on if some AI for SOC packages have been installed or not

The PR also makes a small change to the SecurityRoutePageWrapper component, to allow us to redirect to the Security Solution HomePage instead of the NoPrivilegesPage. While this might not be a long term solution, it is the easiest path forward. In the future, AI for SOC will most likely be its own plugin (leaving outside of Security Solution) hence this will not be needed anymore.

Here's the basic behavior of the Alert summary page:

  • The Landing page will be shown if none of the hardcoded AI for SOC packages are installed (these values are hardcoded as we currently do not have a way to filter integrations for the AI for SOC ones only):
    • splunk // doesnt yet exist
    • google_secops
    • microsoft_sentinel
    • sentinel_one
    • crowdstrike
  • The Wrapper component will only be shown if you have at least one of the above AI for SOC packages installed.

Very limited UI added in this PR

Loading integrations No installed packages Some installed packages
Screenshot 2025-03-17 at 6 58 45 PM Screenshot 2025-03-17 at 6 59 15 PM Screenshot 2025-03-17 at 6 59 40 PM

Notes

We need to remove the section at the top of the page that currently shows the Add integrations button. A follow PR will take care of that. This is where that bar is being added. We will have to find a way to not show that for the AI for SOC tier.

How to test

This needs to be ran in Serverless:

  • yarn es serverless --projectType security
  • yarn serverless-security --no-base-path

You also need to enable the AI for SOC tier, by adding the following to your serverless.security.dev.yaml file:

xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]

The Alert summary navigation will NOT be shown for the following Serverless users: viewer, t1_analyst.
and t2_analyst. For those, the navigation entry is not present, and navigating to the url directly will automatically re-route to the Security home page.

Currently, retrieving the integrations (via the fleet/epm/packages endpoint) is also unauthorized for the following users: editor, t3_analyst, threat_intelligence_analyst, rule_author, soc_manager and detections_admin.

This means that the only users that can be currently used to test this PR are:

  • platform_engineer
  • endpoint_operations_analyst
  • endpoint_policy_manager
  • admin
  • system_indices_superuser

Checklist

Will help close https://github.com/elastic/security-team/issues/11954 as well as https://github.com/elastic/security-team/issues/11979.

@PhilippeOberti PhilippeOberti added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team Team:Security Generative AI Security Generative AI v9.1.0 labels Mar 18, 2025
@PhilippeOberti PhilippeOberti marked this pull request as ready for review March 18, 2025 03:44
@PhilippeOberti PhilippeOberti requested review from a team as code owners March 18, 2025 03:44
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@PhilippeOberti PhilippeOberti added the backport:skip This commit does not require backporting label Mar 18, 2025
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Mar 18, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@PhilippeOberti PhilippeOberti force-pushed the alerty-summary-initialization branch 4 times, most recently from f3a4072 to 030aa78 Compare March 19, 2025 20:30
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #3 / Alerting builtin alertTypes es_query Query DSL only runs correctly: fetches field formatting in esQuery search type
  • [job] [logs] FTR Configs #82 / Monitoring app Elasticsearch nodes listing with offline node skipCloud should have a nodes table with correct rows with default sorting

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 7089 7094 +5

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1346 1353 +7

Async chunks

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

id before after diff
fleet 1.7MB 1.7MB -1.0B
securitySolution 8.9MB 8.9MB +2.1KB
total +2.1KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
fleet 87 88 +1

Page load bundle

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

id before after diff
fleet 159.4KB 159.6KB +256.0B
securitySolution 88.3KB 88.3KB -1.0B
total +255.0B
Unknown metric groups

API count

id before after diff
fleet 1474 1481 +7

History

Copy link
Contributor

@logeekal logeekal left a comment

Choose a reason for hiding this comment

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

Overall PR looks good 👏 .

One more small question. If I am adding below lines, i still do not get access to complete security but only to ai_soc. Do we know the reason to this?

xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
    { product_line: 'security', product_tier: 'complete' },
  ]

@PhilippeOberti
Copy link
Contributor Author

Overall PR looks good 👏 .

One more small question. If I am adding below lines, i still do not get access to complete security but only to ai_soc. Do we know the reason to this?

xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
    { product_line: 'security', product_tier: 'complete' },
  ]

I kinda makes sense to me as you can't have those 2 tiers living next to each other. You're either ai_for_soc OR security. Now as of why ai_for_soc takes priority over security I'm not sure...

@PhilippeOberti PhilippeOberti force-pushed the alerty-summary-initialization branch from 030aa78 to 50e0e3c Compare March 20, 2025 16:26
@PhilippeOberti PhilippeOberti merged commit 3605a33 into elastic:main Mar 20, 2025
9 checks passed
@PhilippeOberti PhilippeOberti deleted the alerty-summary-initialization branch March 20, 2025 18:42
PhilippeOberti added a commit that referenced this pull request Mar 21, 2025
## Summary

This PR continues the work done in
#214889 and implements the landing
page for the new alert summary page. This landing page should only be
visible by users if none of the AI for SOC integrations have been
installed (more info in [the previous
PR](#214889)).

The landing page consist of 2 main sections:
- the top section with a title and an image
- the bottom section where we list the top 2 AI for SOC integrations -
Splunk and GoogleSecOps - which are clickable and will redirect the
users to the respective integration detail pages, as well as a `View all
integrations` button which will redirect the users to the integrations
page.

![Screenshot 2025-03-19 at 3 37
46 PM](https://github.com/user-attachments/assets/311bb9b9-1bd3-4c7a-bcb9-f929d459aa70)


https://github.com/user-attachments/assets/0d15a65d-7f2e-4e2d-9919-896f5532f08c

Link to mocks:
https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=4408-128249&t=GaxMP8OEZ9Qsjl0R-0

### Notes

- The current image is only temporary and acts as a placeholder while
the UIUX team is creating a gif or video (no ETA on when it will be
available).
- The integration links are subject to change in the future, but that
work is handled by a different team and as not being completed yet

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [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

Contributes to elastic/security-team#11979
PhilippeOberti added a commit that referenced this pull request Mar 21, 2025
## Summary

This PR continues and finalizes the pre-work done in
#214889. Once this PR is merged,
the actual alert summary page content implementation will begin. We need
a dataView to be created before being able to fetch any data. The
`wrapper.tsx` component creates a dataView.
- While the dataView is being created, a loading skeleton mimicking the
future layout of the alert summary page is rendered.
- If the dataView fails to be correctly created (meaning if it comes
back undefined or without an id) we show an error message.
- If the dataView is correctly created, we continue to the alert summary
page (currently just a div)


https://github.com/user-attachments/assets/f1c8f63e-30a0-4186-94b6-f18a18a89218

![Screenshot 2025-03-20 at 12 09
02 AM](https://github.com/user-attachments/assets/8ad6055b-1788-4372-afc1-af33e75cb29a)

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

### Notes

You'll need to either have some AI for SOC integrations installed, or
more easily you can change the `alert_summary.tsx` line 38 from `if
(installedPackages.length === 0) {` to `if (installedPackages.length >
0) {` to force the wrapper component to render.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [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
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Mar 24, 2025
## Summary

This PR is the setting the foundations for the AI for SOC Alert summary
page. It has very little UI, instead it focuses on the following:
- add routing for the `alert_summary` page
- fetches the integrations, filters them to only keep the ones related
to AI for SOC, then decides what to render depending on if some AI for
SOC packages have been installed or not

The PR also makes a small change to the `SecurityRoutePageWrapper`
component, to allow us to redirect to the Security Solution HomePage
instead of the NoPrivilegesPage. While this might not be a long term
solution, it is the easiest path forward. In the future, AI for SOC will
most likely be its own plugin (leaving outside of Security Solution)
hence this will not be needed anymore.

Here's the basic behavior of the Alert summary page:
- The `Landing page` will be shown if none of the hardcoded AI for SOC
packages are installed (these values are hardcoded as we currently do
not have a way to filter integrations for the AI for SOC ones only):
  - splunk // doesnt yet exist
  - google_secops
  - microsoft_sentinel
  - sentinel_one
  - crowdstrike
- The `Wrapper` component will only be shown if you have at least one of
the above AI for SOC packages installed.

### Very limited UI added in this PR

| Loading integrations | No installed packages | Some installed packages
|
| ------------- | ------------- | ------------- |
| ![Screenshot 2025-03-17 at 6 58
45 PM](https://github.com/user-attachments/assets/68089c33-fa40-4201-8b51-3e7236d50d5a)
| ![Screenshot 2025-03-17 at 6 59
15 PM](https://github.com/user-attachments/assets/e7e5af2d-bdab-4bef-881e-bb5e512c3545)
| ![Screenshot 2025-03-17 at 6 59
40 PM](https://github.com/user-attachments/assets/61b346bb-799f-4a0b-95cb-e3092ea58d37)
|

### Notes

We need to remove the section at the top of the page that currently
shows the `Add integrations` button. A follow PR will take care of that.
[This](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/app/home/index.tsx#L54)
is where that bar is being added. We will have to find a way to not show
that for the AI for SOC tier.

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

The Alert summary navigation will NOT be shown for the following
Serverless users: `viewer`, `t1_analyst`.
and `t2_analyst`. For those, the navigation entry is not present, and
navigating to the url directly will automatically re-route to the
Security home page.

Currently, retrieving the integrations (via the `fleet/epm/packages`
endpoint) is also unauthorized for the following users: `editor`,
`t3_analyst`, `threat_intelligence_analyst`, `rule_author`,
`soc_manager` and `detections_admin`.

This means that the only users that can be currently used to test this
PR are:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [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

Will help close elastic/security-team#11954 as
well as elastic/security-team#11979.
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Mar 24, 2025
## Summary

This PR continues the work done in
elastic#214889 and implements the landing
page for the new alert summary page. This landing page should only be
visible by users if none of the AI for SOC integrations have been
installed (more info in [the previous
PR](elastic#214889)).

The landing page consist of 2 main sections:
- the top section with a title and an image
- the bottom section where we list the top 2 AI for SOC integrations -
Splunk and GoogleSecOps - which are clickable and will redirect the
users to the respective integration detail pages, as well as a `View all
integrations` button which will redirect the users to the integrations
page.

![Screenshot 2025-03-19 at 3 37
46 PM](https://github.com/user-attachments/assets/311bb9b9-1bd3-4c7a-bcb9-f929d459aa70)


https://github.com/user-attachments/assets/0d15a65d-7f2e-4e2d-9919-896f5532f08c

Link to mocks:
https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=4408-128249&t=GaxMP8OEZ9Qsjl0R-0

### Notes

- The current image is only temporary and acts as a placeholder while
the UIUX team is creating a gif or video (no ETA on when it will be
available).
- The integration links are subject to change in the future, but that
work is handled by a different team and as not being completed yet

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [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

Contributes to elastic/security-team#11979
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Mar 24, 2025
## Summary

This PR continues and finalizes the pre-work done in
elastic#214889. Once this PR is merged,
the actual alert summary page content implementation will begin. We need
a dataView to be created before being able to fetch any data. The
`wrapper.tsx` component creates a dataView.
- While the dataView is being created, a loading skeleton mimicking the
future layout of the alert summary page is rendered.
- If the dataView fails to be correctly created (meaning if it comes
back undefined or without an id) we show an error message.
- If the dataView is correctly created, we continue to the alert summary
page (currently just a div)


https://github.com/user-attachments/assets/f1c8f63e-30a0-4186-94b6-f18a18a89218

![Screenshot 2025-03-20 at 12 09
02 AM](https://github.com/user-attachments/assets/8ad6055b-1788-4372-afc1-af33e75cb29a)

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

### Notes

You'll need to either have some AI for SOC integrations installed, or
more easily you can change the `alert_summary.tsx` line 38 from `if
(installedPackages.length === 0) {` to `if (installedPackages.length >
0) {` to force the wrapper component to render.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [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
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Team:Security Generative AI Security Generative AI Team:Threat Hunting:Investigations Security Solution Investigations Team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants