9
9
10
10
import org .elasticsearch .action .admin .indices .alias .TransportIndicesAliasesAction ;
11
11
import org .elasticsearch .action .admin .indices .delete .TransportDeleteIndexAction ;
12
+ import org .elasticsearch .action .admin .indices .mapping .put .TransportAutoPutMappingAction ;
12
13
import org .elasticsearch .action .admin .indices .mapping .put .TransportPutMappingAction ;
13
14
import org .elasticsearch .action .admin .indices .rollover .RolloverAction ;
14
15
import org .elasticsearch .action .admin .indices .settings .put .TransportUpdateSettingsAction ;
@@ -99,14 +100,16 @@ static RoleDescriptor kibanaSystem(String name) {
99
100
// The symbolic constant for this one is in SecurityActionMapper, so not
100
101
// accessible from X-Pack core
101
102
"cluster:admin/analyze" ,
103
+ "cluster:admin/script/put" ,
104
+ "cluster:admin/script/get" ,
102
105
// To facilitate using the file uploader functionality
103
106
"monitor_text_structure" ,
104
107
// To cancel tasks and delete async searches
105
108
"cancel_task" },
106
109
new RoleDescriptor .IndicesPrivileges [] {
107
110
// System indices defined in KibanaPlugin
108
111
RoleDescriptor .IndicesPrivileges .builder ()
109
- .indices (".kibana*" , ".reporting-*" )
112
+ .indices (".kibana*" , ".reporting-*" , ".chat-*" )
110
113
.privileges ("all" )
111
114
.allowRestrictedIndices (true )
112
115
.build (),
@@ -160,8 +163,11 @@ static RoleDescriptor kibanaSystem(String name) {
160
163
// Data telemetry reads mappings, metadata and stats of indices
161
164
RoleDescriptor .IndicesPrivileges .builder ().indices ("*" ).privileges ("view_index_metadata" , "monitor" ).build (),
162
165
// Endpoint diagnostic information. Kibana reads from these indices to send
163
- // telemetry
164
- RoleDescriptor .IndicesPrivileges .builder ().indices (".logs-endpoint.diagnostic.collection-*" ).privileges ("read" ).build (),
166
+ // telemetry and also creates the index when policies are first created
167
+ RoleDescriptor .IndicesPrivileges .builder ()
168
+ .indices (".logs-endpoint.diagnostic.collection-*" )
169
+ .privileges ("read" , "create_index" )
170
+ .build (),
165
171
// Fleet secrets. Kibana can only write to this index.
166
172
RoleDescriptor .IndicesPrivileges .builder ()
167
173
.indices (".fleet-secrets*" )
@@ -219,12 +225,19 @@ static RoleDescriptor kibanaSystem(String name) {
219
225
.privileges ("all" )
220
226
.allowRestrictedIndices (true )
221
227
.build (),
228
+ // Fleet writes to this datastream for Agent status alerting feature
229
+ RoleDescriptor .IndicesPrivileges .builder ().indices ("logs-elastic_agent.status_change-*" ).privileges ("all" ).build (),
222
230
// Fleet telemetry queries Agent Logs indices in kibana task runner
223
231
RoleDescriptor .IndicesPrivileges .builder ().indices ("logs-elastic_agent*" ).privileges ("read" ).build (),
224
232
// Fleet publishes Agent metrics in kibana task runner
225
233
RoleDescriptor .IndicesPrivileges .builder ().indices ("metrics-fleet_server*" ).privileges ("all" ).build (),
226
234
// Fleet reads output health from this index pattern
227
235
RoleDescriptor .IndicesPrivileges .builder ().indices ("logs-fleet_server*" ).privileges ("read" , "delete_index" ).build (),
236
+ // Fleet creates and writes this index for sync integrations feature
237
+ RoleDescriptor .IndicesPrivileges .builder ()
238
+ .indices ("fleet-synced-integrations" , "fleet-synced-integrations-ccr*" )
239
+ .privileges ("create_index" , "manage" , "read" , "write" )
240
+ .build (),
228
241
// Legacy "Alerts as data" used in Security Solution.
229
242
// Kibana user creates these indices; reads / writes to them.
230
243
RoleDescriptor .IndicesPrivileges .builder ()
@@ -254,6 +267,26 @@ static RoleDescriptor kibanaSystem(String name) {
254
267
// Observability, etc.
255
268
// Kibana system user uses them to read / write alerts.
256
269
RoleDescriptor .IndicesPrivileges .builder ().indices (ReservedRolesStore .ALERTS_INDEX_ALIAS ).privileges ("all" ).build (),
270
+ // "Cases as data" analytics indexes and aliases
271
+ RoleDescriptor .IndicesPrivileges .builder ().indices (ReservedRolesStore .CASES_ANALYTICS_INDEXES ).privileges ("all" ).build (),
272
+ RoleDescriptor .IndicesPrivileges .builder ().indices (ReservedRolesStore .CASES_ANALYTICS_ALIASES ).privileges ("all" ).build (),
273
+ // "Alerts as data" public index alias used in Security Solution
274
+ // Kibana system user uses them to read / write alerts.
275
+ RoleDescriptor .IndicesPrivileges .builder ()
276
+ .indices (ReservedRolesStore .ADHOC_ALERTS_BACKING_INDEX , ReservedRolesStore .ADHOC_ALERTS_INDEX_ALIAS )
277
+ .privileges (
278
+ "create_index" ,
279
+ "read" ,
280
+ "write" ,
281
+ "view_index_metadata" ,
282
+ "maintenance" ,
283
+ RolloverAction .NAME ,
284
+ TransportIndicesAliasesAction .NAME ,
285
+ TransportPutMappingAction .TYPE .name (),
286
+ TransportAutoPutMappingAction .TYPE .name (),
287
+ TransportUpdateSettingsAction .TYPE .name ()
288
+ )
289
+ .build (),
257
290
// "Alerts as data" public index alias used in Security Solution
258
291
// Kibana system user uses them to read / write alerts.
259
292
RoleDescriptor .IndicesPrivileges .builder ().indices (ReservedRolesStore .PREVIEW_ALERTS_INDEX_ALIAS ).privileges ("all" ).build (),
@@ -296,17 +329,19 @@ static RoleDescriptor kibanaSystem(String name) {
296
329
)
297
330
.build (),
298
331
// Endpoint specific action responses. Kibana reads and writes (for third party
299
- // agents) to the index
300
- // to display action responses to the user.
332
+ // agents) to the index to display action responses to the user.
333
+ // `create_index`: is necessary in order to ensure that the DOT datastream index is
334
+ // created by Kibana in order to avoid errors on the Elastic Defend side when streaming
335
+ // documents to it.
301
336
RoleDescriptor .IndicesPrivileges .builder ()
302
337
.indices (".logs-endpoint.action.responses-*" )
303
- .privileges ("auto_configure" , "read" , "write" )
338
+ .privileges ("auto_configure" , "read" , "write" , "create_index" )
304
339
.build (),
305
340
// Endpoint specific actions. Kibana reads and writes to this index to track new
306
341
// actions and display them.
307
342
RoleDescriptor .IndicesPrivileges .builder ()
308
343
.indices (".logs-endpoint.actions-*" )
309
- .privileges ("auto_configure" , "read" , "write" )
344
+ .privileges ("auto_configure" , "read" , "write" , "create_index" )
310
345
.build (),
311
346
// Legacy Osquery manager specific action responses. Kibana reads from these to
312
347
// display responses to the user.
@@ -334,14 +369,19 @@ static RoleDescriptor kibanaSystem(String name) {
334
369
// ingested by Fleet integrations
335
370
// in order to provide support for response actions related to malicious events
336
371
// for such agents.
337
- RoleDescriptor .IndicesPrivileges .builder ().indices ("logs-sentinel_one.*" , "logs-crowdstrike.*" ).privileges ("read" ).build (),
372
+ RoleDescriptor .IndicesPrivileges .builder ()
373
+ .indices ("logs-sentinel_one.*" , "logs-crowdstrike.*" , "logs-microsoft_defender_endpoint.*" , "logs-m365_defender.*" )
374
+ .privileges ("read" )
375
+ .build (),
338
376
// For ILM policy for APM, Endpoint, & Synthetics packages that have delete
339
377
// action
340
378
RoleDescriptor .IndicesPrivileges .builder ()
341
379
.indices (
342
380
".logs-endpoint.diagnostic.collection-*" ,
343
381
"logs-apm-*" ,
344
382
"logs-apm.*-*" ,
383
+ "logs-cloud_security_posture.findings-*" ,
384
+ "logs-cloud_security_posture.vulnerabilities-*" ,
345
385
"metrics-apm-*" ,
346
386
"metrics-apm.*-*" ,
347
387
"traces-apm-*" ,
@@ -426,18 +466,37 @@ static RoleDescriptor kibanaSystem(String name) {
426
466
RoleDescriptor .IndicesPrivileges .builder ()
427
467
.indices (
428
468
"logs-cloud_security_posture.findings_latest-default*" ,
429
- "logs-cloud_security_posture.scores-default*" ,
430
469
"logs-cloud_security_posture.vulnerabilities_latest-default*"
431
470
)
432
471
.privileges (
433
472
"create_index" ,
434
473
"read" ,
435
474
"index" ,
436
475
"delete" ,
476
+
477
+ // Require "delete_index" to perform ILM policy actions
478
+ TransportDeleteIndexAction .TYPE .name (),
479
+ "manage" ,
437
480
TransportIndicesAliasesAction .NAME ,
438
481
TransportUpdateSettingsAction .TYPE .name ()
439
482
)
440
483
.build (),
484
+ // For destination indices of the Cloud Security Posture packages that ships a
485
+ // transform (specific for scores indexes, as of 9.0.0 score indices will need to have auto_put priviliges)
486
+ RoleDescriptor .IndicesPrivileges .builder ()
487
+ .indices ("logs-cloud_security_posture.scores-default*" )
488
+ .privileges (
489
+ "create_index" ,
490
+ "read" ,
491
+ "index" ,
492
+ "delete" ,
493
+ // Require "delete_index" to perform ILM policy actions
494
+ TransportDeleteIndexAction .TYPE .name (),
495
+ TransportIndicesAliasesAction .NAME ,
496
+ TransportUpdateSettingsAction .TYPE .name (),
497
+ TransportAutoPutMappingAction .TYPE .name ()
498
+ )
499
+ .build (),
441
500
// For source indices of the Cloud Detection & Response (CDR) packages that ships a
442
501
// transform
443
502
RoleDescriptor .IndicesPrivileges .builder ()
@@ -460,12 +519,40 @@ static RoleDescriptor kibanaSystem(String name) {
460
519
)
461
520
.privileges ("read" , "view_index_metadata" )
462
521
.build (),
522
+ // For source indices of the Cloud Detection & Response (CDR) packages
523
+ // that ships a transform and has ILM policy
524
+ RoleDescriptor .IndicesPrivileges .builder ()
525
+ .indices ("logs-m365_defender.vulnerability-*" , "logs-microsoft_defender_endpoint.vulnerability-*" )
526
+ .privileges (
527
+ "read" ,
528
+ "view_index_metadata" ,
529
+ // Require "delete_index" to perform ILM policy actions
530
+ TransportDeleteIndexAction .TYPE .name ()
531
+ )
532
+ .build (),
533
+ // For ExtraHop and QualysGAV specific actions. Kibana reads, writes and manages this index
534
+ // for configured ILM policies.
535
+ RoleDescriptor .IndicesPrivileges .builder ()
536
+ .indices ("logs-extrahop.investigation-*" , "logs-qualys_gav.asset-*" )
537
+ .privileges (
538
+ "manage" ,
539
+ "create_index" ,
540
+ "read" ,
541
+ "index" ,
542
+ "write" ,
543
+ "delete" ,
544
+ // Require "delete_index" to perform ILM policy actions
545
+ TransportDeleteIndexAction .TYPE .name (),
546
+ TransportIndicesAliasesAction .NAME ,
547
+ TransportAutoPutMappingAction .TYPE .name ()
548
+ )
549
+ .build (),
463
550
// For alias indices of the Cloud Detection & Response (CDR) packages that ships a
464
551
// transform
465
552
RoleDescriptor .IndicesPrivileges .builder ()
466
553
// manage privilege required by the index alias
467
554
.indices ("security_solution-*.vulnerability_latest" , "security_solution-*.misconfiguration_latest" )
468
- .privileges ("manage" , TransportIndicesAliasesAction .NAME , TransportUpdateSettingsAction .TYPE .name ())
555
+ .privileges ("manage" , "read" , TransportIndicesAliasesAction .NAME , TransportUpdateSettingsAction .TYPE .name ())
469
556
.build (),
470
557
// For destination indices of the Cloud Detection & Response (CDR) packages that ships a
471
558
// transform
@@ -483,11 +570,12 @@ static RoleDescriptor kibanaSystem(String name) {
483
570
.build (),
484
571
// security entity analytics indices
485
572
RoleDescriptor .IndicesPrivileges .builder ().indices ("risk-score.risk-*" ).privileges ("all" ).build (),
573
+ RoleDescriptor .IndicesPrivileges .builder ().indices (".entity_analytics.*" ).privileges ("all" ).build (),
486
574
RoleDescriptor .IndicesPrivileges .builder ()
487
575
.indices (".asset-criticality.asset-criticality-*" )
488
576
.privileges ("create_index" , "manage" , "read" , "write" )
489
577
.build (),
490
- RoleDescriptor .IndicesPrivileges .builder ().indices (".entities.v1.latest.security*" ).privileges ("read" ).build (),
578
+ RoleDescriptor .IndicesPrivileges .builder ().indices (".entities.v1.latest.security*" ).privileges ("read" , "write" ).build (),
491
579
// For cloud_defend usageCollection
492
580
RoleDescriptor .IndicesPrivileges .builder ()
493
581
.indices ("logs-cloud_defend.*" , "metrics-cloud_defend.*" )
@@ -498,7 +586,23 @@ static RoleDescriptor kibanaSystem(String name) {
498
586
RoleDescriptor .IndicesPrivileges .builder ().indices (".slo-observability.*" ).privileges ("all" ).build (),
499
587
// Endpoint heartbeat. Kibana reads from these to determine metering/billing for
500
588
// endpoints.
501
- RoleDescriptor .IndicesPrivileges .builder ().indices (".logs-endpoint.heartbeat-*" ).privileges ("read" ).build (),
589
+ RoleDescriptor .IndicesPrivileges .builder ().indices (".logs-endpoint.heartbeat-*" ).privileges ("read" , "create_index" ).build (),
590
+ // Security Solution workflows insights. Kibana creates, manages, and uses these
591
+ // to provide users with insights on potential configuration improvements
592
+ RoleDescriptor .IndicesPrivileges .builder ()
593
+ .indices (".edr-workflow-insights-*" )
594
+ .privileges (
595
+ "create_index" ,
596
+ "auto_configure" ,
597
+ "manage" ,
598
+ "read" ,
599
+ "write" ,
600
+ "delete" ,
601
+ TransportUpdateSettingsAction .TYPE .name (),
602
+ TransportPutMappingAction .TYPE .name (),
603
+ RolloverAction .NAME
604
+ )
605
+ .build (),
502
606
// For connectors telemetry. Will be removed once we switched to connectors API
503
607
RoleDescriptor .IndicesPrivileges .builder ().indices (".elastic-connectors*" ).privileges ("read" ).build () },
504
608
null ,
0 commit comments