Skip to content

Commit 364c70e

Browse files
authored
[Fleet] add privileges to kibana_system to read integrations data (elastic#132400)
* add privileges to kibana_system to read integrations data * fix tests
1 parent 76dac08 commit 364c70e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ static RoleDescriptor kibanaSystem(String name) {
328328
"indices:admin/data_stream/lifecycle/put"
329329
)
330330
.build(),
331+
// Read datasets for auto install content packages feature in Fleet
332+
RoleDescriptor.IndicesPrivileges.builder().indices("logs-*", "metrics-*", "traces-*").privileges("read").build(),
331333
// Endpoint specific action responses. Kibana reads and writes (for third party
332334
// agents) to the index to display action responses to the user.
333335
// `create_index`: is necessary in order to ensure that the DOT datastream index is

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,10 @@ public void testKibanaSystemRole() {
13971397
|| indexName.startsWith(".logs-endpoint.actions-")
13981398
|| indexName.startsWith(".logs-endpoint.action.responses-")
13991399
|| indexName.startsWith(".logs-endpoint.heartbeat-")
1400-
|| indexName.startsWith(".logs-osquery_manager.actions-");
1400+
|| indexName.startsWith(".logs-osquery_manager.actions-")
1401+
|| indexName.startsWith("logs-")
1402+
|| indexName.startsWith("metrics-")
1403+
|| indexName.startsWith("traces-");
14011404
assertThat(
14021405
kibanaRole.indices().allowedIndicesMatcher(TransportGetAction.TYPE.name()).test(indexAbstraction),
14031406
is(isAlsoReadIndex)

0 commit comments

Comments
 (0)