|
37 | 37 | import java.util.stream.Collectors;
|
38 | 38 |
|
39 | 39 | public class ReservedRolesStore implements BiConsumer<Set<String>, ActionListener<RoleRetrievalResult>> {
|
40 |
| - public static final String LEGACY_ALERTS_INDEX = ".siem-signals*"; |
41 |
| - public static final String ALERTS_INDEX = ".alerts*"; |
| 40 | + public static final String ALERTS_LEGACY_INDEX = ".siem-signals*"; |
| 41 | + public static final String ALERTS_BACKING_INDEX = ".internal.alerts*"; |
| 42 | + public static final String ALERTS_INDEX_ALIAS = ".alerts*"; |
42 | 43 |
|
43 | 44 | public static final RoleDescriptor SUPERUSER_ROLE_DESCRIPTOR = new RoleDescriptor("superuser",
|
44 | 45 | new String[] { "all" },
|
@@ -422,15 +423,20 @@ public static RoleDescriptor kibanaSystemRoleDescriptor(String name) {
|
422 | 423 | RoleDescriptor.IndicesPrivileges.builder()
|
423 | 424 | .indices(".fleet*")
|
424 | 425 | .privileges("all").build(),
|
425 |
| - // Legacy "Alerts as data" index. Kibana user will create this index. |
426 |
| - // Kibana user will read / write to these indices |
| 426 | + // Legacy "Alerts as data" used in Security Solution. |
| 427 | + // Kibana user creates these indices; reads / writes to them. |
427 | 428 | RoleDescriptor.IndicesPrivileges.builder()
|
428 |
| - .indices(ReservedRolesStore.LEGACY_ALERTS_INDEX) |
| 429 | + .indices(ReservedRolesStore.ALERTS_LEGACY_INDEX) |
429 | 430 | .privileges("all").build(),
|
430 |
| - // "Alerts as data" index. Kibana user will create this index. |
431 |
| - // Kibana user will read / write to these indices |
| 431 | + // "Alerts as data" internal backing indices used in Security Solution, Observability, etc. |
| 432 | + // Kibana system user creates these indices; reads / writes to them via the aliases (see below). |
432 | 433 | RoleDescriptor.IndicesPrivileges.builder()
|
433 |
| - .indices(ReservedRolesStore.ALERTS_INDEX) |
| 434 | + .indices(ReservedRolesStore.ALERTS_BACKING_INDEX) |
| 435 | + .privileges("all").build(), |
| 436 | + // "Alerts as data" public index aliases used in Security Solution, Observability, etc. |
| 437 | + // Kibana system user uses them to read / write alerts. |
| 438 | + RoleDescriptor.IndicesPrivileges.builder() |
| 439 | + .indices(ReservedRolesStore.ALERTS_INDEX_ALIAS) |
434 | 440 | .privileges("all").build(),
|
435 | 441 | // Endpoint / Fleet policy responses. Kibana requires read access to send telemetry
|
436 | 442 | RoleDescriptor.IndicesPrivileges.builder()
|
|
0 commit comments