Skip to content

Commit e1e4cce

Browse files
committed
Reducing privileges
1 parent 6f9622b commit e1e4cce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private static Map<String, RoleDescriptor> initializeReservedRoles() {
136136
new String[] { "monitor", MonitoringBulkAction.NAME},
137137
new RoleDescriptor.IndicesPrivileges[]{
138138
RoleDescriptor.IndicesPrivileges.builder()
139-
.indices(".monitoring-beats-*").privileges("create_index", "write").build()
139+
.indices(".monitoring-beats-*").privileges("create_index", "createto setup local exporter").build()
140140
},
141141
null, MetadataUtils.DEFAULT_RESERVED_METADATA))
142142
.put(UsernamesField.APM_ROLE, new RoleDescriptor(UsernamesField.APM_ROLE,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ public void testBeatsSystemRole() {
858858
is(false));
859859
assertThat(beatsSystemRole.indices().allowedIndicesMatcher(CreateIndexAction.NAME).test(index), is(true));
860860
assertThat(beatsSystemRole.indices().allowedIndicesMatcher(IndexAction.NAME).test(index), is(true));
861-
assertThat(beatsSystemRole.indices().allowedIndicesMatcher(DeleteAction.NAME).test(index), is(true));
861+
assertThat(beatsSystemRole.indices().allowedIndicesMatcher(DeleteAction.NAME).test(index), is(false));
862862
assertThat(beatsSystemRole.indices().allowedIndicesMatcher(BulkAction.NAME).test(index), is(true));
863863

864864
assertNoAccessAllowed(beatsSystemRole, RestrictedIndicesNames.RESTRICTED_NAMES);

0 commit comments

Comments
 (0)