Skip to content

Commit bc4a819

Browse files
committed
Update kibana system user permissions for cases analytics index.
1 parent 63da93d commit bc4a819

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/KibanaOwnedReservedRoleDescriptors.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ static RoleDescriptor kibanaSystem(String name) {
100100
// The symbolic constant for this one is in SecurityActionMapper, so not
101101
// accessible from X-Pack core
102102
"cluster:admin/analyze",
103+
"cluster:admin/script/put",
104+
"cluster:admin/script/get",
103105
// To facilitate using the file uploader functionality
104106
"monitor_text_structure",
105107
// To cancel tasks and delete async searches
@@ -564,7 +566,13 @@ static RoleDescriptor kibanaSystem(String name) {
564566
)
565567
.build(),
566568
// For connectors telemetry. Will be removed once we switched to connectors API
567-
RoleDescriptor.IndicesPrivileges.builder().indices(".elastic-connectors*").privileges("read").build() },
569+
RoleDescriptor.IndicesPrivileges.builder().indices(".elastic-connectors*").privileges("read").build(),
570+
// Hidden indices for cases analytics
571+
RoleDescriptor.IndicesPrivileges.builder()
572+
.indices(".internal.cases*")
573+
.privileges("all")
574+
.build()
575+
},
568576
null,
569577
new ConfigurableClusterPrivilege[] {
570578
new ConfigurableClusterPrivileges.ManageApplicationPrivileges(Set.of("kibana-*")),

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ public void testKibanaSystemRole() {
434434
assertThat(kibanaRole.cluster().check(ClusterUpdateSettingsAction.NAME, request, authentication), is(false));
435435
assertThat(kibanaRole.cluster().check(MonitoringBulkAction.NAME, request, authentication), is(true));
436436

437+
// Script
438+
assertTrue(kibanaRole.cluster().check("cluster:admin/script/put", request, authentication));
439+
assertTrue(kibanaRole.cluster().check("cluster:admin/script/get", request, authentication));
440+
437441
// Inference
438442
assertTrue(kibanaRole.cluster().check("cluster:admin/xpack/inference/get", request, authentication));
439443
assertTrue(kibanaRole.cluster().check("cluster:admin/xpack/inference/put", request, authentication));
@@ -609,6 +613,7 @@ public void testKibanaSystemRole() {
609613
".apm-agent-configuration",
610614
".apm-custom-link",
611615
".apm-source-map",
616+
".internal.cases" + randomAlphaOfLength(randomIntBetween(0, 13)),
612617
ReservedRolesStore.ALERTS_LEGACY_INDEX + randomAlphaOfLength(randomIntBetween(0, 13)),
613618
ReservedRolesStore.ALERTS_LEGACY_INDEX_REINDEXED_V8 + randomAlphaOfLength(randomIntBetween(0, 13)),
614619
ReservedRolesStore.ALERTS_BACKING_INDEX + randomAlphaOfLength(randomIntBetween(0, 13)),

0 commit comments

Comments
 (0)