org.apache.hadoop.fs.http.server
Class HttpFSKerberosAuthenticationHandler
java.lang.Object
org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler
org.apache.hadoop.fs.http.server.HttpFSKerberosAuthenticationHandler
- All Implemented Interfaces:
- org.apache.hadoop.security.authentication.server.AuthenticationHandler
@InterfaceAudience.Private
public class HttpFSKerberosAuthenticationHandler
- extends org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler
Server side AuthenticationHandler that authenticates requests
using the incoming delegation token as a 'delegation' query string parameter.
If not delegation token is present in the request it delegates to the
KerberosAuthenticationHandler
| Fields inherited from class org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler |
KEYTAB, NAME_RULES, PRINCIPAL |
|
Method Summary |
org.apache.hadoop.security.authentication.server.AuthenticationToken |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Authenticates a request looking for the delegation
query-string parameter and verifying it is a valid token. |
String |
getType()
Returns authentication type of the handler. |
boolean |
managementOperation(org.apache.hadoop.security.authentication.server.AuthenticationToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
| Methods inherited from class org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler |
destroy, getKeytab, getPrincipal, init |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
HttpFSKerberosAuthenticationHandler
public HttpFSKerberosAuthenticationHandler()
getType
public String getType()
- Returns authentication type of the handler.
- Specified by:
getType in interface org.apache.hadoop.security.authentication.server.AuthenticationHandler- Overrides:
getType in class org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler
- Returns:
delegationtoken-kerberos
managementOperation
public 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
- Specified by:
managementOperation in interface org.apache.hadoop.security.authentication.server.AuthenticationHandler- Overrides:
managementOperation in class org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler
- Throws:
IOException
org.apache.hadoop.security.authentication.client.AuthenticationException
authenticate
public 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
- Authenticates a request looking for the
delegation
query-string parameter and verifying it is a valid token. If there is not
delegation query-string parameter, it delegates the
authentication to the KerberosAuthenticationHandler unless it is
disabled.
- Specified by:
authenticate in interface org.apache.hadoop.security.authentication.server.AuthenticationHandler- Overrides:
authenticate in class org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler
- Parameters:
request - the HTTP client request.response - the HTTP client response.
- Returns:
- the authentication token for the authenticated request.
- Throws:
IOException - thrown if an IO error occurred.
org.apache.hadoop.security.authentication.client.AuthenticationException - thrown if the authentication failed.
Copyright © 2014 Apache Software Foundation. All Rights Reserved.