public class KerberosBasicAuthenticationHandler extends KerberosAuthenticationHandler
KerberosBasicAuthenticationHandler augments the Kerberos SPNEGO authentication mechanism with the Kerberos Basic Login authentication
mechanism. If a user provides user credentials in a HTTPS, POST call, then a Kerberos login is attempted. In the authentication failure scenario,
the SPNEGO sequence is invoked.
The supported configuration properties that are required in addition to those required by KerberosAuthenticationHandler are:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AUTHORIZATION_HEADER |
static java.lang.String |
BASIC_AUTHENTICATION |
static java.lang.String |
LOGIN_ENABLED_CONFIG |
static java.lang.String |
SPNEGO_ENABLED_CONFIG |
static java.lang.String |
TYPE |
DOAS_QUERY_STRING, ENABLE_TRUSTED_PROXY, KEYTAB, LOAD_BALANCER_PRINCIPAL, NAME_RULES, PRINCIPAL, QUERY_STRING_DELIMITERJWT_SSO_ENABLED, NON_BROWSER_USER_AGENTS, NON_BROWSER_USER_AGENTS_DEFAULT, WWW_AUTHENTICATE| Modifier and Type | Method and Description |
|---|---|
AuthenticationToken |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Perform Basic authentication through Kerberos, if the authentication fails, delegates to KerberosAuthenticationHandler for SPNEGO exchange.
|
void |
destroy()
Releases any resources initialized by the authentication handler.
|
java.lang.String |
getType()
Returns the authentication type of the authentication handler, 'kerberos'.
|
void |
init(java.util.Properties config)
Initializes the authentication handler instance.
|
getDoasUser, getKeytab, getPrincipals, setNonBrowserUserAgents, shouldAuthenticatepublic static final java.lang.String LOGIN_ENABLED_CONFIG
public static final java.lang.String SPNEGO_ENABLED_CONFIG
public static final java.lang.String TYPE
public static final java.lang.String AUTHORIZATION_HEADER
public static final java.lang.String BASIC_AUTHENTICATION
public java.lang.String getType()
KerberosAuthenticationHandlergetType in interface AuthenticationHandlergetType in class KerberosAuthenticationHandlerpublic void init(java.util.Properties config)
throws javax.servlet.ServletException
KerberosAuthenticationHandlerIt creates a Kerberos context using the principal and keytab specified in the configuration.
This method is invoked by the AuthenticationFilter.init(javax.servlet.FilterConfig) method.
init in interface AuthenticationHandlerinit in class KerberosAuthenticationHandlerconfig - configuration properties to initialize the handler.javax.servlet.ServletException - thrown if the handler could not be initialized.public void destroy()
KerberosAuthenticationHandlerIt destroys the Kerberos context.
destroy in interface AuthenticationHandlerdestroy in class KerberosAuthenticationHandlerpublic AuthenticationToken authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, AuthenticationException
authenticate in interface AuthenticationHandlerauthenticate in class KerberosAuthenticationHandlerrequest - the HTTP client request.response - the HTTP client response.java.io.IOExceptionAuthenticationException