From ada5834d8668cd9af5f4abeb039c9618b75cf4fd Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Fri, 3 May 2024 15:33:49 -0500 Subject: [PATCH] fix example compile --- .../org/elasticsearch/example/CustomAuthorizationEngine.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/examples/security-authorization-engine/src/main/java/org/elasticsearch/example/CustomAuthorizationEngine.java b/plugins/examples/security-authorization-engine/src/main/java/org/elasticsearch/example/CustomAuthorizationEngine.java index 1eeb32ed13469..3ffefd0a5abe4 100644 --- a/plugins/examples/security-authorization-engine/src/main/java/org/elasticsearch/example/CustomAuthorizationEngine.java +++ b/plugins/examples/security-authorization-engine/src/main/java/org/elasticsearch/example/CustomAuthorizationEngine.java @@ -23,6 +23,7 @@ import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl; import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl.IndexAccessControl; import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions; +import org.elasticsearch.xpack.core.security.authz.permission.RemoteClusterPermissions; import org.elasticsearch.xpack.core.security.authz.permission.ResourcePrivileges; import org.elasticsearch.xpack.core.security.authz.privilege.ApplicationPrivilegeDescriptor; import org.elasticsearch.xpack.core.security.authz.privilege.ConfigurableClusterPrivilege; @@ -220,7 +221,8 @@ private GetUserPrivilegesResponse getUserPrivilegesResponse(boolean isSuperuser) RoleDescriptor.ApplicationResourcePrivileges.builder().application("*").privileges("*").resources("*").build()) : Collections.emptySet(); final Set runAs = isSuperuser ? Collections.singleton("*") : Collections.emptySet(); - return new GetUserPrivilegesResponse(cluster, conditionalCluster, indices, application, runAs, Set.of()); + return new GetUserPrivilegesResponse(cluster, conditionalCluster, indices, application, runAs, Set.of(), + RemoteClusterPermissions.NONE); } public static class CustomAuthorizationInfo implements AuthorizationInfo {