Skip to content

Commit b11b8b8

Browse files
authored
[Security Solution][Detections] Adds list plugin Saved Objects to Security feature privilege (#90895)
## Summary Add's the list plugins Saved Objects (`exception-list` and `exception-list-agnostic`) to the `Security` feature privilege. Resolves #90715 ### Test Instructions Load pre-packaged roles/users, and ensure only those with the Kibana Space privilege `Security:All` have the ability to create/edit rules and exception lists (space-aware/agnostic). Users with `Security:Read` should only be able to view rules/exception lists. Pre-packaged security roles should no longer be granted the `Saved Objects Management` feature privilege, and this feature privilege should no longer be required to use any of the Detections features. To add test users: t1_analyst (`"siem": ["read"]`): ``` bash cd x-pack/plugins/security_solution/server/lib/detection_engine/scripts/ ./roles_users/t1_analyst/post_detections_role.sh roles_users/t1_analyst/detections_role.json ./roles_users/t1_analyst/post_detections_user.sh roles_users/t1_analyst/detections_user.json ``` hunter (`"siem": ["all"]`): ``` bash cd x-pack/plugins/security_solution/server/lib/detection_engine/scripts/ ./roles_users/t1_analyst/post_detections_role.sh roles_users/hunter/detections_role.json ./roles_users/t1_analyst/post_detections_user.sh roles_users/hunter/detections_user.json ``` Note: Be sure to remove these users after testing if using a public cluster. ### Checklist Delete any items that are not applicable to this PR. - [X] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials -- `docs` label added, will work with @jmikell821 on doc changes - [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
1 parent 8c4af6f commit b11b8b8

File tree

13 files changed

+616
-553
lines changed

13 files changed

+616
-553
lines changed

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/detections_admin/detections_role.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
"siem": ["all"],
2727
"actions": ["read"],
2828
"builtInAlerts": ["all"],
29-
"dev_tools": ["all"],
30-
"savedObjectsManagement": ["all"]
29+
"dev_tools": ["all"]
3130
},
3231
"spaces": ["*"]
3332
}

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/hunter/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ This user can CRUD rules and signals. The main difference here is the user has
22

33
```json
44
"builtInAlerts": ["all"],
5-
"savedObjectsManagement": ["all"]
65
```
76

87
privileges whereas the T1 and T2 have "read" privileges which prevents them from creating rules

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/hunter/detections_role.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
"ml": ["read"],
3131
"siem": ["all"],
3232
"actions": ["read"],
33-
"builtInAlerts": ["all"],
34-
"savedObjectsManagement": ["all"]
33+
"builtInAlerts": ["all"]
3534
},
3635
"spaces": ["*"]
3736
}

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/platform_engineer/detections_role.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
"ml": ["all"],
3131
"siem": ["all"],
3232
"actions": ["all"],
33-
"builtInAlerts": ["all"],
34-
"savedObjectsManagement": ["all"]
33+
"builtInAlerts": ["all"]
3534
},
3635
"spaces": ["*"]
3736
}

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/reader/detections_role.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"ml": ["read"],
2525
"siem": ["read"],
2626
"actions": ["read"],
27-
"builtInAlerts": ["read"],
28-
"savedObjectsManagement": ["read"]
27+
"builtInAlerts": ["read"]
2928
},
3029
"spaces": ["*"]
3130
}

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/rule_author/detections_role.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"ml": ["read"],
2929
"siem": ["all"],
3030
"actions": ["read"],
31-
"builtInAlerts": ["all"],
32-
"savedObjectsManagement": ["all"]
31+
"builtInAlerts": ["all"]
3332
},
3433
"spaces": ["*"]
3534
}

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/soc_manager/detections_role.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"ml": ["read"],
2929
"siem": ["all"],
3030
"actions": ["all"],
31-
"builtInAlerts": ["all"],
32-
"savedObjectsManagement": ["all"]
31+
"builtInAlerts": ["all"]
3332
},
3433
"spaces": ["*"]
3534
}

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/t1_analyst/detections_role.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
{
2222
"feature": {
2323
"ml": ["read"],
24-
"siem": ["all"],
24+
"siem": ["read"],
2525
"actions": ["read"],
26-
"builtInAlerts": ["read"],
27-
"savedObjectsManagement": ["read"]
26+
"builtInAlerts": ["read"]
2827
},
2928
"spaces": ["*"]
3029
}

x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/t2_analyst/detections_role.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@
2323
{
2424
"feature": {
2525
"ml": ["read"],
26-
"siem": ["all"],
26+
"siem": ["read"],
2727
"actions": ["read"],
28-
"builtInAlerts": ["read"],
29-
"savedObjectsManagement": ["read"]
28+
"builtInAlerts": ["read"]
3029
},
3130
"spaces": ["*"]
3231
}

x-pack/plugins/security_solution/server/plugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
219219
'cases-comments',
220220
'cases-configure',
221221
'cases-user-actions',
222+
'exception-list',
223+
'exception-list-agnostic',
222224
...savedObjectTypes,
223225
],
224226
read: ['config'],
@@ -243,6 +245,8 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
243245
'cases-comments',
244246
'cases-configure',
245247
'cases-user-actions',
248+
'exception-list',
249+
'exception-list-agnostic',
246250
...savedObjectTypes,
247251
],
248252
},

0 commit comments

Comments
 (0)