Skip to content

[8.x] [Security Solution] SIEM Migrations RBAC (#207087)#210151

Merged
semd merged 2 commits intoelastic:8.xfrom
semd:backport/8.x/pr-207087
Feb 7, 2025
Merged

[8.x] [Security Solution] SIEM Migrations RBAC (#207087)#210151
semd merged 2 commits intoelastic:8.xfrom
semd:backport/8.x/pr-207087

Conversation

@semd
Copy link
Copy Markdown
Contributor

@semd semd commented Feb 7, 2025

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Sergi Massaneda "}},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com//pull/207087","number":207087,"mergeCommit":{"message":"[Security Solution] SIEM Migrations RBAC (#207087)\n\n## Summary\r\n\r\nImplements the access controls for SIEM rule migrations.\r\n\r\n## API changes\r\n\r\n- All API routes have been secured with \"SIEM Migration\" feature checks\r\n- Start migration API route now checks if the user has privileges to use\r\nthe connector ID received\r\n \r\n## UI changes\r\n\r\n### Onboarding SIEM migrations\r\n\r\n- AI Connector selection\r\n- Actions & Connectors: Read -> This privilege allows reading and\r\nselecting a connector\r\n\r\nOtherwise, we show a callout with the missing privileges:\r\n![connector read\r\nmissing](https://github.com/user-attachments/assets/2eb474df-78f0-488c-803b-7c874123b62a)\r\n\r\n- Create a migration\r\n - Security All -> Main Security read & write access\r\n - Siem Migrations All -> new feature under the Security catalog\r\n- Actions & Connectors: Read -> This privilege allows connector\r\nexecution for LLM calls\r\n\r\nOtherwise, we show a callout with the missing privileges:\r\n![onboarding start card\r\ncallout](https://github.com/user-attachments/assets/19975efd-d684-47d8-b4c0-0352b7c319b4)\r\n\r\n### Rule Translations page\r\n\r\n- Minimum privileges to make the page accessible (read access):\r\n - Security Read -> Main Security read access\r\n - Siem Migrations All -> new feature under the Security catalog\r\n \r\nOtherwise, we hide the link in the navigation and display the generic\r\nempty state if accessed:\r\n![rules minimum privileges\r\nmissing](https://github.com/user-attachments/assets/9dd88c72-e669-4fde-8397-e76d3d5069f9)\r\n\r\n- To successfully install rules the following privileges are also\r\nrequired (write access):\r\n - Security All -> Main Security read & write access\r\n- Index privileges for `.alerts*` pattern: _read, write,\r\nview_index_metadata, manage_\r\n - Index privileges for `lookup_*` pattern: _read_\r\n\r\nOtherwise, we show a callout at the top of the page, this callout is\r\nconsistent with the one displayed on the Detection Rules page\r\n(`/app/security/rules`)\r\n![alerts privileges\r\nmissing](https://github.com/user-attachments/assets/105e53d7-9591-457f-983a-7fe4f9f33068)\r\n\r\n- To retry rule translations (upload missing macros/lookups or retry\r\nerrors)\r\n- Actions & Connectors: Read -> This privilege allows connector\r\nexecution for LLM calls\r\n\r\nOtherwise, when attempted, we show a toast with the missing privilege. \r\n\r\n![](https://github.com/user-attachments/assets/f6090bb5-e6f8-4be7-bb9b-c4192155bdf8)\r\n\r\n## Other changes\r\n\r\n- Technical preview label\r\n\r\n![technical\r\npreview](https://github.com/user-attachments/assets/244724e2-9756-4c6d-805f-3459367f7975)\r\n\r\n- No connector selected toast\r\n\r\n\r\nhttps://github.com/user-attachments/assets/e4900129-ae9c-413f-9a41-f7dca452e71d\r\n\r\n## Fixes\r\n\r\n- [Fixed] Not possible to select a connector when no connector is\r\nselected:\r\n![bug\r\nconnectors](https://github.com/user-attachments/assets/2f5a831e-2172-4e77-9997-2447b4ee866f)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine \r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"a990be66dffbe89b271722630fd78b544b6ae903"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->

## Summary

Implements the access controls for SIEM rule migrations.

## API changes

- All API routes have been secured with "SIEM Migration" feature checks
- Start migration API route now checks if the user has privileges to use
the connector ID received

## UI changes

###  Onboarding SIEM migrations

- AI Connector selection
- Actions & Connectors: Read -> This privilege allows reading and
selecting a connector

Otherwise, we show a callout with the missing privileges:
![connector read
missing](https://github.com/user-attachments/assets/2eb474df-78f0-488c-803b-7c874123b62a)

- Create a migration
  - Security All -> Main Security read & write access
  - Siem Migrations All -> new feature under the Security catalog
- Actions & Connectors: Read -> This privilege allows connector
execution for LLM calls

Otherwise, we show a callout with the missing privileges:
![onboarding start card
callout](https://github.com/user-attachments/assets/19975efd-d684-47d8-b4c0-0352b7c319b4)

### Rule Translations page

- Minimum privileges to make the page accessible (read access):
  - Security Read -> Main Security read access
  - Siem Migrations All -> new feature under the Security catalog

Otherwise, we hide the link in the navigation and display the generic
empty state if accessed:
![rules minimum privileges
missing](https://github.com/user-attachments/assets/9dd88c72-e669-4fde-8397-e76d3d5069f9)

- To successfully install rules the following privileges are also
required (write access):
  - Security All -> Main Security read & write access
- Index privileges for `.alerts*` pattern: _read, write,
view_index_metadata, manage_
  - Index privileges for `lookup_*` pattern: _read_

Otherwise, we show a callout at the top of the page, this callout is
consistent with the one displayed on the Detection Rules page
(`/app/security/rules`)
![alerts privileges
missing](https://github.com/user-attachments/assets/105e53d7-9591-457f-983a-7fe4f9f33068)

- To retry rule translations (upload missing macros/lookups or retry
errors)
- Actions & Connectors: Read -> This privilege allows connector
execution for LLM calls

Otherwise, when attempted, we show a toast with the missing privilege.

![](https://github.com/user-attachments/assets/f6090bb5-e6f8-4be7-bb9b-c4192155bdf8)

## Other changes

- Technical preview label

![technical
preview](https://github.com/user-attachments/assets/244724e2-9756-4c6d-805f-3459367f7975)

- No connector selected toast

https://github.com/user-attachments/assets/e4900129-ae9c-413f-9a41-f7dca452e71d

## Fixes

- [Fixed] Not possible to select a connector when no connector is
selected:
![bug
connectors](https://github.com/user-attachments/assets/2f5a831e-2172-4e77-9997-2447b4ee866f)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit a990be6)

# Conflicts:
#	x-pack/test/spaces_api_integration/common/suites/get.ts
@semd semd requested a review from kibanamachine as a code owner February 7, 2025 09:55
@semd semd added the backport This PR is a backport of another PR label Feb 7, 2025
@semd semd enabled auto-merge (squash) February 7, 2025 09:55
@semd semd merged commit 43efa5b into elastic:8.x Feb 7, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 6720 6728 +8

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
@kbn/security-solution-features 17 26 +9

Async chunks

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

id before after diff
securitySolution 18.8MB 18.8MB +8.3KB

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
@kbn/security-solution-features 9 10 +1
securitySolution 33 32 -1
total -0

Page load bundle

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

id before after diff
securitySolution 87.8KB 88.1KB +373.0B
securitySolutionServerless 26.3KB 26.4KB +111.0B
total +484.0B
Unknown metric groups

API count

id before after diff
@kbn/security-solution-features 17 26 +9

ESLint disabled line counts

id before after diff
securitySolution 576 577 +1

Total ESLint disabled count

id before after diff
securitySolution 659 660 +1

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants