|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler
public class KerberosAuthenticationHandler
The KerberosAuthenticationHandler implements the Kerberos SPNEGO authentication mechanism for HTTP.
HTTP/${HOSTNAME}@{REALM}. The realm can be omitted from the
principal as the JDK GSS libraries will use the realm name of the configured default realm.
It does not have a default value.KerberosName.setRules(String)
| Field Summary | |
|---|---|
static String |
KEYTAB
Constant for the configuration property that indicates the keytab file path. |
static String |
NAME_RULES
Constant for the configuration property that indicates the Kerberos name rules for the Kerberos principals. |
static String |
PRINCIPAL
Constant for the configuration property that indicates the kerberos principal. |
static String |
TYPE
Constant that identifies the authentication mechanism. |
| Constructor Summary | |
|---|---|
KerberosAuthenticationHandler()
Creates a Kerberos SPNEGO authentication handler with the default auth-token type, kerberos. |
|
KerberosAuthenticationHandler(String type)
Creates a Kerberos SPNEGO authentication handler with a custom auth-token type. |
|
| Method Summary | |
|---|---|
AuthenticationToken |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
It enforces the the Kerberos SPNEGO authentication sequence returning an AuthenticationToken only
after the Kerberos SPNEGO sequence has completed successfully. |
void |
destroy()
Releases any resources initialized by the authentication handler. |
protected String |
getKeytab()
Returns the keytab used by the authentication handler. |
protected Set<KerberosPrincipal> |
getPrincipals()
Returns the Kerberos principals used by the authentication handler. |
String |
getType()
Returns the authentication type of the authentication handler, 'kerberos'. |
void |
init(Properties config)
Initializes the authentication handler instance. |
boolean |
managementOperation(AuthenticationToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is an empty implementation, it always returns TRUE. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TYPE
public static final String PRINCIPAL
public static final String KEYTAB
public static final String NAME_RULES
| Constructor Detail |
|---|
public KerberosAuthenticationHandler()
kerberos.
public KerberosAuthenticationHandler(String type)
type - auth-token type.| Method Detail |
|---|
public void init(Properties config)
throws javax.servlet.ServletException
AuthenticationFilter.init(javax.servlet.FilterConfig) method.
init in interface AuthenticationHandlerconfig - configuration properties to initialize the handler.
javax.servlet.ServletException - thrown if the handler could not be initialized.public void destroy()
destroy in interface AuthenticationHandlerpublic String getType()
getType in interface AuthenticationHandlerprotected Set<KerberosPrincipal> getPrincipals()
protected String getKeytab()
public boolean managementOperation(AuthenticationToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
AuthenticationException
TRUE.
managementOperation in interface AuthenticationHandlertoken - the authentication token if any, otherwise NULL.request - the HTTP client request.response - the HTTP client response.
TRUE
IOException - it is never thrown.
AuthenticationException - it is never thrown.
public AuthenticationToken authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
AuthenticationException
AuthenticationToken only
after the Kerberos SPNEGO sequence has completed successfully.
authenticate in interface AuthenticationHandlerrequest - the HTTP client request.response - the HTTP client response.
null if it is in progress (in this case the handler handles the response to the client).
IOException - thrown if an IO error occurred.
AuthenticationException - thrown if Kerberos SPNEGO sequence failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||