diff --git a/x-pack/plugins/apm/common/privilege_type.ts b/x-pack/plugins/apm/common/privilege_type.ts index e5a67d2a807f0..161225da68480 100644 --- a/x-pack/plugins/apm/common/privilege_type.ts +++ b/x-pack/plugins/apm/common/privilege_type.ts @@ -8,14 +8,12 @@ import * as t from 'io-ts'; export const enum PrivilegeType { - SOURCEMAP = 'sourcemap:write', EVENT = 'event:write', AGENT_CONFIG = 'config_agent:read', } export const privilegesTypeRt = t.array( t.union([ - t.literal(PrivilegeType.SOURCEMAP), t.literal(PrivilegeType.EVENT), t.literal(PrivilegeType.AGENT_CONFIG), ]) diff --git a/x-pack/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.tsx b/x-pack/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.tsx index 1634706d330e2..684a7386f35e6 100644 --- a/x-pack/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.tsx +++ b/x-pack/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.tsx @@ -43,12 +43,11 @@ export function CreateAgentKeyFlyout({ onCancel, onSuccess, onError }: Props) { const [agentKeyBody, setAgentKeyBody] = useState({ name: '', - sourcemap: true, event: true, agentConfig: true, }); - const { name, sourcemap, event, agentConfig } = agentKeyBody; + const { name, event, agentConfig } = agentKeyBody; const currentUser = useCurrentUser(); @@ -73,10 +72,6 @@ export function CreateAgentKeyFlyout({ onCancel, onSuccess, onError }: Props) { try { const privileges: PrivilegeType[] = []; - if (sourcemap) { - privileges.push(PrivilegeType.SOURCEMAP); - } - if (event) { privileges.push(PrivilegeType.EVENT); } @@ -206,27 +201,6 @@ export function CreateAgentKeyFlyout({ onCancel, onSuccess, onError }: Props) { /> - - - setAgentKeyBody((state) => ({ - ...state, - sourcemap: !state.sourcemap, - })) - } - /> - - diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 6558334913435..a1db17454109d 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -7374,7 +7374,6 @@ "xpack.apm.settings.agentKeys.createKeyFlyout.namePlaceholder": "Par exemple, apm-key", "xpack.apm.settings.agentKeys.createKeyFlyout.nameTitle": "Nom", "xpack.apm.settings.agentKeys.createKeyFlyout.privilegesFieldset": "Attribuer des privilèges", - "xpack.apm.settings.agentKeys.createKeyFlyout.sourcemaps": "Requis pour le téléchargement des cartes sources.", "xpack.apm.settings.agentKeys.createKeyFlyout.userTitle": "Utilisateur", "xpack.apm.settings.agentKeys.deleteConfirmModal.cancel": "Annuler", "xpack.apm.settings.agentKeys.deleteConfirmModal.delete": "Supprimer", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 5a6e17d82c29c..9ec2c5ba026da 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -7363,7 +7363,6 @@ "xpack.apm.settings.agentKeys.createKeyFlyout.namePlaceholder": "例:apm-key", "xpack.apm.settings.agentKeys.createKeyFlyout.nameTitle": "名前", "xpack.apm.settings.agentKeys.createKeyFlyout.privilegesFieldset": "権限を割り当て", - "xpack.apm.settings.agentKeys.createKeyFlyout.sourcemaps": "ソースマップのアップロードに必要です。", "xpack.apm.settings.agentKeys.createKeyFlyout.userTitle": "ユーザー", "xpack.apm.settings.agentKeys.deleteConfirmModal.cancel": "キャンセル", "xpack.apm.settings.agentKeys.deleteConfirmModal.delete": "削除", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 107dcec2ce65b..915e40765e5aa 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -7377,7 +7377,6 @@ "xpack.apm.settings.agentKeys.createKeyFlyout.namePlaceholder": "例如,apm-key", "xpack.apm.settings.agentKeys.createKeyFlyout.nameTitle": "名称", "xpack.apm.settings.agentKeys.createKeyFlyout.privilegesFieldset": "分配权限", - "xpack.apm.settings.agentKeys.createKeyFlyout.sourcemaps": "上传源地图所必需。", "xpack.apm.settings.agentKeys.createKeyFlyout.userTitle": "用户", "xpack.apm.settings.agentKeys.deleteConfirmModal.cancel": "取消", "xpack.apm.settings.agentKeys.deleteConfirmModal.delete": "删除", diff --git a/x-pack/test/apm_api_integration/common/authentication.ts b/x-pack/test/apm_api_integration/common/authentication.ts index 28dffac7f80ca..e975f6e147442 100644 --- a/x-pack/test/apm_api_integration/common/authentication.ts +++ b/x-pack/test/apm_api_integration/common/authentication.ts @@ -78,7 +78,7 @@ const customRoles = { applications: [ { application: 'apm', - privileges: [PrivilegeType.AGENT_CONFIG, PrivilegeType.EVENT, PrivilegeType.SOURCEMAP], + privileges: [PrivilegeType.AGENT_CONFIG, PrivilegeType.EVENT], resources: ['*'], }, ], diff --git a/x-pack/test/apm_api_integration/tests/settings/agent_keys/agent_keys.spec.ts b/x-pack/test/apm_api_integration/tests/settings/agent_keys/agent_keys.spec.ts index 2f607cecb75bb..c0d6500fd298c 100644 --- a/x-pack/test/apm_api_integration/tests/settings/agent_keys/agent_keys.spec.ts +++ b/x-pack/test/apm_api_integration/tests/settings/agent_keys/agent_keys.spec.ts @@ -17,11 +17,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const esClient = getService('es'); const agentKeyName = 'test'; - const allApplicationPrivileges = [ - PrivilegeType.AGENT_CONFIG, - PrivilegeType.EVENT, - PrivilegeType.SOURCEMAP, - ]; + const allApplicationPrivileges = [PrivilegeType.AGENT_CONFIG, PrivilegeType.EVENT]; async function createAgentKey(apiClient: ApmApiSupertest, privileges = allApplicationPrivileges) { return await apiClient({