From 7b90d6fccb2dcc0750a6b4a928d160a05bfad6de Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Mon, 10 Jan 2022 14:35:04 +1100 Subject: [PATCH] Remove unused bwc variable from ApiKeyService (#81964) * Remove unused bwc variable from ApiKeyService The variable lives in Subject since #80926. --- .../xpack/security/authc/ApiKeyService.java | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ApiKeyService.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ApiKeyService.java index 39f32ef8f4f9e..970ee00e009dc 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ApiKeyService.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ApiKeyService.java @@ -200,45 +200,6 @@ public class ApiKeyService { Property.NodeScope ); - // This following fixed role descriptor is for fleet-server BWC on and before 7.14. - // It is fixed and must NOT be updated when the fleet-server service account updates. - private static final BytesArray FLEET_SERVER_ROLE_DESCRIPTOR_BYTES_V_7_14 = new BytesArray(""" - { - "elastic/fleet-server": { - "cluster": [ "monitor", "manage_own_api_key" ], - "indices": [ - { - "names": [ - "logs-*", - "metrics-*", - "traces-*", - "synthetics-*", - ".logs-endpoint.diagnostic.collection-*" - ], - "privileges": [ "write", "create_index", "auto_configure" ], - "allow_restricted_indices": false - }, - { - "names": [ ".fleet-*" ], - "privileges": [ - "read", - "write", - "monitor", - "create_index", - "auto_configure" - ], - "allow_restricted_indices": false - } - ], - "applications": [], - "run_as": [], - "metadata": {}, - "transient_metadata": { - "enabled": true - } - } - }"""); - private final Clock clock; private final Client client; private final SecurityIndexManager securityIndex;