Skip to content

Commit 404f1a9

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

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,16 @@ 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
106108
"cancel_task" },
107109
new RoleDescriptor.IndicesPrivileges[] {
108110
// System indices defined in KibanaPlugin
109111
RoleDescriptor.IndicesPrivileges.builder()
110-
.indices(".kibana*", ".reporting-*")
112+
.indices(".kibana*", ".reporting-*", ".internal.cases*")
111113
.privileges("all")
112114
.allowRestrictedIndices(true)
113115
.build(),

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)