public class LdapAuthenticationHandler extends Object implements org.apache.hadoop.security.authentication.server.AuthenticationHandler
LdapAuthenticationHandler implements the BASIC authentication
mechanism for HTTP using LDAP back-end.
The supported configuration properties are:
| Modifier and Type | Field and Description |
|---|---|
static String |
BASE_DN
Constant for the configuration property that indicates the base
distinguished name (DN) to be used with the LDAP server.
|
static String |
BASIC_AUTH_SCHEME
Constant that identifies the HTTP authentication scheme.
|
static String |
ENABLE_START_TLS
Constant for the configuration property that indicates the base
distinguished name (DN) to be used with the LDAP server.
|
static String |
LDAP_BIND_DOMAIN
Constant for the configuration property that indicates the LDAP bind domain
value to be used with the LDAP server.
|
static String |
PROVIDER_URL
Constant for the configuration property that indicates the url of the LDAP
server.
|
static String |
SECURITY_AUTHENTICATION
Constant that identifies the authentication mechanism to be used with the
LDAP server.
|
static String |
TYPE
Constant that identifies the authentication mechanism.
|
| Constructor and Description |
|---|
LdapAuthenticationHandler() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.security.authentication.server.AuthenticationToken |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
destroy() |
String |
getType() |
Collection<String> |
getTypes() |
void |
init(Properties config) |
boolean |
managementOperation(org.apache.hadoop.security.authentication.server.AuthenticationToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setDisableHostNameVerification(Boolean disableHostNameVerification)
Configure the Host name verification for this handler.
|
void |
setEnableStartTls(Boolean enableStartTls)
Configure StartTLS LDAP extension for this handler.
|
public static final String BASIC_AUTH_SCHEME
public static final String TYPE
public static final String SECURITY_AUTHENTICATION
public static final String PROVIDER_URL
public static final String BASE_DN
public static final String LDAP_BIND_DOMAIN
public static final String ENABLE_START_TLS
public void setEnableStartTls(Boolean enableStartTls)
enableStartTls - true If the StartTLS LDAP extension is to be enabled
false otherwisepublic void setDisableHostNameVerification(Boolean disableHostNameVerification)
disableHostNameVerification - true to disable host-name verification
false otherwisepublic String getType()
getType in interface org.apache.hadoop.security.authentication.server.AuthenticationHandlerpublic Collection<String> getTypes()
public void init(Properties config) throws javax.servlet.ServletException
init in interface org.apache.hadoop.security.authentication.server.AuthenticationHandlerjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface org.apache.hadoop.security.authentication.server.AuthenticationHandlerpublic boolean managementOperation(org.apache.hadoop.security.authentication.server.AuthenticationToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
org.apache.hadoop.security.authentication.client.AuthenticationException
managementOperation in interface org.apache.hadoop.security.authentication.server.AuthenticationHandlerIOExceptionorg.apache.hadoop.security.authentication.client.AuthenticationExceptionpublic org.apache.hadoop.security.authentication.server.AuthenticationToken authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
org.apache.hadoop.security.authentication.client.AuthenticationException
authenticate in interface org.apache.hadoop.security.authentication.server.AuthenticationHandlerIOExceptionorg.apache.hadoop.security.authentication.client.AuthenticationExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.