Module org.elasticsearch.security
Class SecondaryAuthenticator
java.lang.Object
org.elasticsearch.xpack.security.authc.support.SecondaryAuthenticator
Performs "secondary user authentication" (that is, a second user, _not_ second factor authentication).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSecondaryAuthenticator(Settings settings, ThreadContext threadContext, AuthenticationService authenticationService, AuditTrailService auditTrailService) SecondaryAuthenticator(SecurityContext securityContext, AuthenticationService authenticationService, AuditTrailService auditTrailService) -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(String action, TransportRequest request, ActionListener<SecondaryAuthentication> listener) voidauthenticateAndAttachToContext(RestRequest request, ActionListener<SecondaryAuthentication> listener)
-
Field Details
-
SECONDARY_AUTH_HEADER_NAME
The term "Authorization" in the header value is to mimic the standard HTTP "Authorization" header- See Also:
-
SECONDARY_X_CLIENT_AUTH_HEADER_NAME
Header name for secondary client authentication credentials. Used by authenticators that require additional [@code X-Client-Authentication} header along with the Authorization header.- See Also:
-
-
Constructor Details
-
SecondaryAuthenticator
public SecondaryAuthenticator(Settings settings, ThreadContext threadContext, AuthenticationService authenticationService, AuditTrailService auditTrailService) -
SecondaryAuthenticator
public SecondaryAuthenticator(SecurityContext securityContext, AuthenticationService authenticationService, AuditTrailService auditTrailService)
-
-
Method Details
-
authenticate
public void authenticate(String action, TransportRequest request, ActionListener<SecondaryAuthentication> listener) - Parameters:
listener- Handler for theSecondaryAuthenticationobject. If the secondary authentication credentials do not exist the thread context, theActionListener.onResponse(Object)method is called with anullauthentication value. If the secondary authentication credentials are found in the thread context, but fail to be authenticated, then the failure is returned throughActionListener.onFailure(Exception).
-
authenticateAndAttachToContext
public void authenticateAndAttachToContext(RestRequest request, ActionListener<SecondaryAuthentication> listener) - Parameters:
listener- Handler for theSecondaryAuthenticationobject. If the secondary authentication credentials do not exist the thread context, theActionListener.onResponse(Object)method is called with anullauthentication value. If the secondary authentication credentials are found in the thread context, but fail to be authenticated, then the failure is returned throughActionListener.onFailure(Exception).
-