mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Security Solution] SIEM Migrations RBAC (#207087)
## 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:  - 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:  ### 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:  - 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`)  - 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.  ## Other changes - Technical preview label  - 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:  --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
151ce184c5
commit
a990be66df
96 changed files with 1692 additions and 809 deletions
|
@ -156,7 +156,10 @@ import { StopRuleMigrationRequestParamsInput } from '@kbn/security-solution-plug
|
|||
import { SuggestUserProfilesRequestQueryInput } from '@kbn/security-solution-plugin/common/api/detection_engine/users/suggest_user_profiles_route.gen';
|
||||
import { TriggerRiskScoreCalculationRequestBodyInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/risk_engine/entity_calculation_route.gen';
|
||||
import { UpdateRuleRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/update_rule/update_rule_route.gen';
|
||||
import { UpdateRuleMigrationRequestBodyInput } from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen';
|
||||
import {
|
||||
UpdateRuleMigrationRequestParamsInput,
|
||||
UpdateRuleMigrationRequestBodyInput,
|
||||
} from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen';
|
||||
import {
|
||||
UpdateWorkflowInsightRequestParamsInput,
|
||||
UpdateWorkflowInsightRequestBodyInput,
|
||||
|
@ -1005,6 +1008,16 @@ finalize it.
|
|||
.set(ELASTIC_HTTP_VERSION_HEADER, '1')
|
||||
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana');
|
||||
},
|
||||
/**
|
||||
* Identifies the privileges required for a SIEM rules migration and returns the missing privileges
|
||||
*/
|
||||
getRuleMigrationPrivileges(kibanaSpace: string = 'default') {
|
||||
return supertest
|
||||
.get(routeWithNamespace('/internal/siem_migrations/rules/missing_privileges', kibanaSpace))
|
||||
.set('kbn-xsrf', 'true')
|
||||
.set(ELASTIC_HTTP_VERSION_HEADER, '1')
|
||||
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana');
|
||||
},
|
||||
/**
|
||||
* Retrieves resources for an existing SIEM rules migration
|
||||
*/
|
||||
|
@ -1577,7 +1590,12 @@ detection engine rules.
|
|||
*/
|
||||
updateRuleMigration(props: UpdateRuleMigrationProps, kibanaSpace: string = 'default') {
|
||||
return supertest
|
||||
.put(routeWithNamespace('/internal/siem_migrations/rules', kibanaSpace))
|
||||
.put(
|
||||
routeWithNamespace(
|
||||
replaceParams('/internal/siem_migrations/rules/{migration_id}', props.params),
|
||||
kibanaSpace
|
||||
)
|
||||
)
|
||||
.set('kbn-xsrf', 'true')
|
||||
.set(ELASTIC_HTTP_VERSION_HEADER, '1')
|
||||
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
|
||||
|
@ -1914,6 +1932,7 @@ export interface UpdateRuleProps {
|
|||
body: UpdateRuleRequestBodyInput;
|
||||
}
|
||||
export interface UpdateRuleMigrationProps {
|
||||
params: UpdateRuleMigrationRequestParamsInput;
|
||||
body: UpdateRuleMigrationRequestBodyInput;
|
||||
}
|
||||
export interface UpdateWorkflowInsightProps {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue