From 1304c2106ee7ae76de6d43a7446b9ebc2befe5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Thu, 15 Oct 2020 15:35:13 +0200 Subject: [PATCH] [APM] Add missing ML privileges (#80553) --- x-pack/plugins/ml/common/types/capabilities.ts | 1 + .../test/apm_api_integration/common/authentication.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/ml/common/types/capabilities.ts b/x-pack/plugins/ml/common/types/capabilities.ts index 42f056b890828..0d208dc0b1b28 100644 --- a/x-pack/plugins/ml/common/types/capabilities.ts +++ b/x-pack/plugins/ml/common/types/capabilities.ts @@ -9,6 +9,7 @@ import { PLUGIN_ID } from '../constants/app'; export const apmUserMlCapabilities = { canGetJobs: false, + canAccessML: false, }; export const userMlCapabilities = { diff --git a/x-pack/test/apm_api_integration/common/authentication.ts b/x-pack/test/apm_api_integration/common/authentication.ts index 6179c88916639..501a844311334 100644 --- a/x-pack/test/apm_api_integration/common/authentication.ts +++ b/x-pack/test/apm_api_integration/common/authentication.ts @@ -29,6 +29,15 @@ const roles = { ], }, [ApmUser.apmReadUserWithoutMlAccess]: { + elasticsearch: { + cluster: [], + indices: [ + { + names: ['apm-*'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, kibana: [ { base: [], @@ -74,7 +83,7 @@ const users = { roles: ['apm_user', ApmUser.apmReadUser], }, [ApmUser.apmReadUserWithoutMlAccess]: { - roles: ['apm_user', ApmUser.apmReadUserWithoutMlAccess], + roles: [ApmUser.apmReadUserWithoutMlAccess], }, [ApmUser.apmWriteUser]: { roles: ['apm_user', ApmUser.apmWriteUser],