diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java index f60fe471f625c..8c76c630049ce 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java @@ -79,6 +79,7 @@ public class ReservedRolesStore implements BiConsumer, ActionListene public static final String ENTITY_STORE_V1_LATEST_INDEX = ".entities.v1.latest.security_*"; public static final String ENTITY_STORE_HISTORY_INDEX = ".entities.*.history.*"; public static final String ASSET_CRITICALITY_INDEX = ".asset-criticality.asset-criticality-*"; + public static final String PRIVILEGED_USER_MONITORING_INDEX = ".entity_analytics.monitoring*"; /** Index pattern for Universal Profiling */ public static final String UNIVERSAL_PROFILING_ALIASES = "profiling-*"; @@ -781,8 +782,9 @@ private static RoleDescriptor buildViewerRoleDescriptor() { ReservedRolesStore.LISTS_INDEX_REINDEXED_V8, ReservedRolesStore.LISTS_ITEMS_INDEX_REINDEXED_V8, ReservedRolesStore.ENTITY_STORE_V1_LATEST_INDEX, - ReservedRolesStore.ENTITY_STORE_HISTORY_INDEX, - ReservedRolesStore.ASSET_CRITICALITY_INDEX + ReservedRolesStore.ASSET_CRITICALITY_INDEX, + ReservedRolesStore.PRIVILEGED_USER_MONITORING_INDEX, + ReservedRolesStore.ENTITY_STORE_HISTORY_INDEX ) .privileges("read", "view_index_metadata") .build(), @@ -851,7 +853,11 @@ private static RoleDescriptor buildEditorRoleDescriptor() { .build(), // Security - Entity Store is view only RoleDescriptor.IndicesPrivileges.builder() - .indices(ReservedRolesStore.ENTITY_STORE_V1_LATEST_INDEX, ReservedRolesStore.ENTITY_STORE_HISTORY_INDEX) + .indices( + ReservedRolesStore.ENTITY_STORE_V1_LATEST_INDEX, + ReservedRolesStore.PRIVILEGED_USER_MONITORING_INDEX, + ReservedRolesStore.ENTITY_STORE_HISTORY_INDEX + ) .privileges("read", "view_index_metadata") .build(), // Alerts-as-data diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java index 638c4df46dc8d..0ad8a22cbe49f 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java @@ -3815,6 +3815,7 @@ public void testPredefinedViewerRole() { assertOnlyReadAllowed(role, ".entities.v1.latest.security_" + randomIntBetween(0, 5)); assertOnlyReadAllowed(role, ".asset-criticality.asset-criticality-" + randomIntBetween(0, 5)); + assertOnlyReadAllowed(role, ".entity_analytics.monitoring" + randomIntBetween(0, 5)); assertOnlyReadAllowed(role, ".slo-observability." + randomIntBetween(0, 5)); assertViewIndexMetadata(role, ".slo-observability." + randomIntBetween(0, 5)); @@ -3887,6 +3888,7 @@ public void testPredefinedEditorRole() { assertOnlyReadAllowed(role, "profiling-" + randomIntBetween(0, 5)); assertOnlyReadAllowed(role, ".profiling-" + randomIntBetween(0, 5)); assertOnlyReadAllowed(role, ".entities.v1.latest.security_" + randomIntBetween(0, 5)); + assertOnlyReadAllowed(role, ".entity_analytics.monitoring" + randomIntBetween(0, 5)); assertOnlyReadAllowed(role, randomAlphaOfLength(5)); assertReadWriteDocsAndMaintenanceButNotDeleteIndexAllowed(role, ".siem-signals-" + randomIntBetween(0, 5));