|
22 | 22 | import org.elasticsearch.xpack.core.ilm.action.StartILMAction; |
23 | 23 | import org.elasticsearch.xpack.core.ilm.action.StopILMAction; |
24 | 24 | import org.elasticsearch.xpack.core.security.action.DelegatePkiAuthenticationAction; |
| 25 | +import org.elasticsearch.xpack.core.security.action.GrantApiKeyAction; |
25 | 26 | import org.elasticsearch.xpack.core.security.action.token.InvalidateTokenAction; |
26 | 27 | import org.elasticsearch.xpack.core.security.action.token.RefreshTokenAction; |
27 | 28 | import org.elasticsearch.xpack.core.security.action.user.HasPrivilegesAction; |
@@ -49,6 +50,7 @@ public class ClusterPrivilegeResolver { |
49 | 50 | private static final Set<String> MANAGE_OIDC_PATTERN = Collections.singleton("cluster:admin/xpack/security/oidc/*"); |
50 | 51 | private static final Set<String> MANAGE_TOKEN_PATTERN = Collections.singleton("cluster:admin/xpack/security/token/*"); |
51 | 52 | private static final Set<String> MANAGE_API_KEY_PATTERN = Collections.singleton("cluster:admin/xpack/security/api_key/*"); |
| 53 | + private static final Set<String> GRANT_API_KEY_PATTERN = Collections.singleton(GrantApiKeyAction.NAME + "*"); |
52 | 54 | private static final Set<String> MONITOR_PATTERN = Collections.singleton("cluster:monitor/*"); |
53 | 55 | private static final Set<String> MONITOR_TRANSFORM_PATTERN = Collections.unmodifiableSet( |
54 | 56 | Sets.newHashSet("cluster:monitor/data_frame/*", "cluster:monitor/transform/*")); |
@@ -118,6 +120,7 @@ public class ClusterPrivilegeResolver { |
118 | 120 | public static final NamedClusterPrivilege MANAGE_SAML = new ActionClusterPrivilege("manage_saml", MANAGE_SAML_PATTERN); |
119 | 121 | public static final NamedClusterPrivilege MANAGE_OIDC = new ActionClusterPrivilege("manage_oidc", MANAGE_OIDC_PATTERN); |
120 | 122 | public static final NamedClusterPrivilege MANAGE_API_KEY = new ActionClusterPrivilege("manage_api_key", MANAGE_API_KEY_PATTERN); |
| 123 | + public static final NamedClusterPrivilege GRANT_API_KEY = new ActionClusterPrivilege("grant_api_key", GRANT_API_KEY_PATTERN); |
121 | 124 | public static final NamedClusterPrivilege MANAGE_PIPELINE = new ActionClusterPrivilege("manage_pipeline", |
122 | 125 | Collections.singleton("cluster:admin/ingest/pipeline/*")); |
123 | 126 | public static final NamedClusterPrivilege MANAGE_AUTOSCALING = new ActionClusterPrivilege( |
@@ -160,6 +163,7 @@ public class ClusterPrivilegeResolver { |
160 | 163 | MANAGE_SAML, |
161 | 164 | MANAGE_OIDC, |
162 | 165 | MANAGE_API_KEY, |
| 166 | + GRANT_API_KEY, |
163 | 167 | MANAGE_PIPELINE, |
164 | 168 | MANAGE_ROLLUP, |
165 | 169 | MANAGE_AUTOSCALING, |
|
0 commit comments