Class AuthorizationService
java.lang.Object
org.elasticsearch.xpack.security.authz.AuthorizationService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationService(org.elasticsearch.common.settings.Settings settings, CompositeRolesStore rolesStore, org.elasticsearch.cluster.service.ClusterService clusterService, AuditTrailService auditTrailService, org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler authcFailureHandler, org.elasticsearch.threadpool.ThreadPool threadPool, org.elasticsearch.xpack.core.security.user.AnonymousUser anonymousUser, org.elasticsearch.xpack.core.security.authz.AuthorizationEngine authorizationEngine, Set<RequestInterceptor> requestInterceptors, org.elasticsearch.license.XPackLicenseState licenseState, org.elasticsearch.cluster.metadata.IndexNameExpressionResolver resolver, OperatorPrivileges.OperatorPrivilegesService operatorPrivilegesService) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddSettings(List<org.elasticsearch.common.settings.Setting<?>> settings) voidauthorize(org.elasticsearch.xpack.core.security.authc.Authentication authentication, String action, org.elasticsearch.transport.TransportRequest originalRequest, org.elasticsearch.action.ActionListener<Void> listener) Verifies that the given user can execute the given request (and action).voidcheckPrivileges(org.elasticsearch.xpack.core.security.authc.Authentication authentication, org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequest request, Collection<org.elasticsearch.xpack.core.security.authz.privilege.ApplicationPrivilegeDescriptor> applicationPrivilegeDescriptors, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse> listener) voidretrieveUserPrivileges(org.elasticsearch.xpack.core.security.authc.Authentication authentication, org.elasticsearch.xpack.core.security.action.user.GetUserPrivilegesRequest request, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.action.user.GetUserPrivilegesResponse> listener)
-
Field Details
-
ANONYMOUS_AUTHORIZATION_EXCEPTION_SETTING
public static final org.elasticsearch.common.settings.Setting<Boolean> ANONYMOUS_AUTHORIZATION_EXCEPTION_SETTING
-
-
Constructor Details
-
AuthorizationService
public AuthorizationService(org.elasticsearch.common.settings.Settings settings, CompositeRolesStore rolesStore, org.elasticsearch.cluster.service.ClusterService clusterService, AuditTrailService auditTrailService, org.elasticsearch.xpack.core.security.authc.AuthenticationFailureHandler authcFailureHandler, org.elasticsearch.threadpool.ThreadPool threadPool, org.elasticsearch.xpack.core.security.user.AnonymousUser anonymousUser, @Nullable org.elasticsearch.xpack.core.security.authz.AuthorizationEngine authorizationEngine, Set<RequestInterceptor> requestInterceptors, org.elasticsearch.license.XPackLicenseState licenseState, org.elasticsearch.cluster.metadata.IndexNameExpressionResolver resolver, OperatorPrivileges.OperatorPrivilegesService operatorPrivilegesService)
-
-
Method Details
-
checkPrivileges
public void checkPrivileges(org.elasticsearch.xpack.core.security.authc.Authentication authentication, org.elasticsearch.xpack.core.security.action.user.HasPrivilegesRequest request, Collection<org.elasticsearch.xpack.core.security.authz.privilege.ApplicationPrivilegeDescriptor> applicationPrivilegeDescriptors, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.action.user.HasPrivilegesResponse> listener) -
retrieveUserPrivileges
public void retrieveUserPrivileges(org.elasticsearch.xpack.core.security.authc.Authentication authentication, org.elasticsearch.xpack.core.security.action.user.GetUserPrivilegesRequest request, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.action.user.GetUserPrivilegesResponse> listener) -
authorize
public void authorize(org.elasticsearch.xpack.core.security.authc.Authentication authentication, String action, org.elasticsearch.transport.TransportRequest originalRequest, org.elasticsearch.action.ActionListener<Void> listener) Verifies that the given user can execute the given request (and action). If the user doesn't have the appropriate privileges for this action/request, anElasticsearchSecurityExceptionwill be thrown.- Parameters:
authentication- The authentication informationaction- The actionoriginalRequest- The requestlistener- The listener that gets called. A call toActionListener.onResponse(Object)indicates success
-
addSettings
-