public class RMAuthenticationHandler
extends org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER |
static String |
TYPE |
| Constructor and Description |
|---|
RMAuthenticationHandler() |
| Modifier and Type | Method and Description |
|---|---|
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 header and
verifying it is a valid token. |
protected String |
getEncodedDelegationTokenFromRequest(javax.servlet.http.HttpServletRequest req)
Extract encoded delegation token from request
|
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) |
static void |
setSecretManager(RMDelegationTokenSecretManager manager) |
protected org.apache.hadoop.security.UserGroupInformation |
verifyToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier> token)
Verifies a delegation token.
|
public static final String TYPE
public static final String HEADER
public String getType()
getType in interface org.apache.hadoop.security.authentication.server.AuthenticationHandlergetType in class org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandlerkerberos-dtpublic boolean managementOperation(org.apache.hadoop.security.authentication.server.AuthenticationToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
managementOperation in interface org.apache.hadoop.security.authentication.server.AuthenticationHandlermanagementOperation in class org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandlerpublic 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
delegation header and
verifying it is a valid token. If the header is missing, it delegates the
authentication to the KerberosAuthenticationHandler unless it is
disabled.authenticate in interface org.apache.hadoop.security.authentication.server.AuthenticationHandlerauthenticate in class org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandlerrequest - the HTTP client request.response - the HTTP client response.IOException - thrown if an IO error occurred.org.apache.hadoop.security.authentication.client.AuthenticationException - thrown if the authentication failed.protected org.apache.hadoop.security.UserGroupInformation verifyToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier> token)
throws IOException
token - delegation token to verify.IOException - thrown if the token could not be verified.protected String getEncodedDelegationTokenFromRequest(javax.servlet.http.HttpServletRequest req)
req - HTTPServletRequest objectpublic static void setSecretManager(RMDelegationTokenSecretManager manager)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.