diff --git a/x-pack/plugins/fleet/server/services/api_keys/index.ts b/x-pack/plugins/fleet/server/services/api_keys/index.ts index 65051163c78c3..911cb700dd56b 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/index.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/index.ts @@ -22,17 +22,8 @@ export async function generateOutputApiKey( cluster: ['monitor'], index: [ { - names: [ - 'logs-*', - 'metrics-*', - 'traces-*', - '.ds-logs-*', - '.ds-metrics-*', - '.ds-traces-*', - '.logs-endpoint.diagnostic.collection-*', - '.ds-.logs-endpoint.diagnostic.collection-*', - ], - privileges: ['write', 'create_index', 'indices:admin/auto_create'], + names: ['logs-*', 'metrics-*', 'traces-*', '.logs-endpoint.diagnostic.collection-*'], + privileges: ['auto_configure', 'create_doc'], }, ], }, diff --git a/x-pack/plugins/fleet/server/services/setup.ts b/x-pack/plugins/fleet/server/services/setup.ts index f19ad4e7fe417..6c8f24e799574 100644 --- a/x-pack/plugins/fleet/server/services/setup.ts +++ b/x-pack/plugins/fleet/server/services/setup.ts @@ -192,17 +192,8 @@ async function putFleetRole(callCluster: CallESAsCurrentUser) { cluster: ['monitor', 'manage_api_key'], indices: [ { - names: [ - 'logs-*', - 'metrics-*', - 'traces-*', - '.ds-logs-*', - '.ds-metrics-*', - '.ds-traces-*', - '.logs-endpoint.diagnostic.collection-*', - '.ds-.logs-endpoint.diagnostic.collection-*', - ], - privileges: ['write', 'create_index', 'indices:admin/auto_create'], + names: ['logs-*', 'metrics-*', 'traces-*', '.logs-endpoint.diagnostic.collection-*'], + privileges: ['auto_configure', 'create_doc'], }, ], }, diff --git a/x-pack/test/fleet_api_integration/apis/agents_setup.ts b/x-pack/test/fleet_api_integration/apis/agents_setup.ts index c1abdfab566b9..20112afdf76a4 100644 --- a/x-pack/test/fleet_api_integration/apis/agents_setup.ts +++ b/x-pack/test/fleet_api_integration/apis/agents_setup.ts @@ -60,17 +60,8 @@ export default function (providerContext: FtrProviderContext) { cluster: ['monitor', 'manage_api_key'], indices: [ { - names: [ - 'logs-*', - 'metrics-*', - 'traces-*', - '.ds-logs-*', - '.ds-metrics-*', - '.ds-traces-*', - '.logs-endpoint.diagnostic.collection-*', - '.ds-.logs-endpoint.diagnostic.collection-*', - ], - privileges: ['write', 'create_index', 'indices:admin/auto_create'], + names: ['logs-*', 'metrics-*', 'traces-*', '.logs-endpoint.diagnostic.collection-*'], + privileges: ['auto_configure', 'create_doc'], allow_restricted_indices: false, }, ], diff --git a/x-pack/test/fleet_api_integration/apis/fleet_setup.ts b/x-pack/test/fleet_api_integration/apis/fleet_setup.ts index 2c15cddc81ea1..31d620cd34931 100644 --- a/x-pack/test/fleet_api_integration/apis/fleet_setup.ts +++ b/x-pack/test/fleet_api_integration/apis/fleet_setup.ts @@ -62,15 +62,8 @@ export default function (providerContext: FtrProviderContext) { cluster: ['monitor', 'manage_api_key'], indices: [ { - names: [ - 'logs-*', - 'metrics-*', - 'traces-*', - '.ds-logs-*', - '.ds-metrics-*', - '.ds-traces-*', - ], - privileges: ['write', 'create_index', 'indices:admin/auto_create'], + names: ['logs-*', 'metrics-*', 'traces-*'], + privileges: ['create_doc', 'indices:admin/auto_create'], allow_restricted_indices: false, }, ], @@ -101,17 +94,8 @@ export default function (providerContext: FtrProviderContext) { cluster: ['monitor', 'manage_api_key'], indices: [ { - names: [ - 'logs-*', - 'metrics-*', - 'traces-*', - '.ds-logs-*', - '.ds-metrics-*', - '.ds-traces-*', - '.logs-endpoint.diagnostic.collection-*', - '.ds-.logs-endpoint.diagnostic.collection-*', - ], - privileges: ['write', 'create_index', 'indices:admin/auto_create'], + names: ['logs-*', 'metrics-*', 'traces-*', '.logs-endpoint.diagnostic.collection-*'], + privileges: ['auto_configure', 'create_doc'], allow_restricted_indices: false, }, ],