org.apache.hadoop.fs.http.client
Class HttpFSKerberosAuthenticator

java.lang.Object
  extended by org.apache.hadoop.security.authentication.client.KerberosAuthenticator
      extended by org.apache.hadoop.fs.http.client.HttpFSKerberosAuthenticator
All Implemented Interfaces:
org.apache.hadoop.security.authentication.client.Authenticator

@InterfaceAudience.Private
public class HttpFSKerberosAuthenticator
extends org.apache.hadoop.security.authentication.client.KerberosAuthenticator

A KerberosAuthenticator subclass that fallback to HttpFSPseudoAuthenticator.


Nested Class Summary
static class HttpFSKerberosAuthenticator.DelegationTokenOperation
          DelegationToken operations.
 
Field Summary
static String DELEGATION_PARAM
           
static String DELEGATION_TOKEN_JSON
           
static String DELEGATION_TOKEN_URL_STRING_JSON
           
static String OP_PARAM
           
static String RENEW_DELEGATION_TOKEN_JSON
           
static String RENEWER_PARAM
           
static String TOKEN_PARAM
           
 
Fields inherited from class org.apache.hadoop.security.authentication.client.KerberosAuthenticator
AUTHORIZATION, NEGOTIATE, WWW_AUTHENTICATE
 
Constructor Summary
HttpFSKerberosAuthenticator()
           
 
Method Summary
 void authenticate(URL url, org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token)
           
static void cancelDelegationToken(URI fsURI, org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token, org.apache.hadoop.security.token.Token<?> dToken)
           
static org.apache.hadoop.security.token.Token<?> getDelegationToken(URI fsURI, InetSocketAddress httpFSAddr, org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token, String renewer)
           
protected  org.apache.hadoop.security.authentication.client.Authenticator getFallBackAuthenticator()
          Returns the fallback authenticator if the server does not use Kerberos SPNEGO HTTP authentication.
static void injectDelegationToken(Map<String,String> params, org.apache.hadoop.security.token.Token<?> dtToken)
           
static long renewDelegationToken(URI fsURI, org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token, org.apache.hadoop.security.token.Token<?> dToken)
           
 
Methods inherited from class org.apache.hadoop.security.authentication.client.KerberosAuthenticator
setConnectionConfigurator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELEGATION_PARAM

public static final String DELEGATION_PARAM
See Also:
Constant Field Values

TOKEN_PARAM

public static final String TOKEN_PARAM
See Also:
Constant Field Values

RENEWER_PARAM

public static final String RENEWER_PARAM
See Also:
Constant Field Values

DELEGATION_TOKEN_JSON

public static final String DELEGATION_TOKEN_JSON
See Also:
Constant Field Values

DELEGATION_TOKEN_URL_STRING_JSON

public static final String DELEGATION_TOKEN_URL_STRING_JSON
See Also:
Constant Field Values

RENEW_DELEGATION_TOKEN_JSON

public static final String RENEW_DELEGATION_TOKEN_JSON
See Also:
Constant Field Values

OP_PARAM

public static final String OP_PARAM
See Also:
Constant Field Values
Constructor Detail

HttpFSKerberosAuthenticator

public HttpFSKerberosAuthenticator()
Method Detail

getFallBackAuthenticator

protected org.apache.hadoop.security.authentication.client.Authenticator getFallBackAuthenticator()
Returns the fallback authenticator if the server does not use Kerberos SPNEGO HTTP authentication.

Overrides:
getFallBackAuthenticator in class org.apache.hadoop.security.authentication.client.KerberosAuthenticator
Returns:
a HttpFSPseudoAuthenticator instance.

injectDelegationToken

public static void injectDelegationToken(Map<String,String> params,
                                         org.apache.hadoop.security.token.Token<?> dtToken)
                                  throws IOException
Throws:
IOException

authenticate

public void authenticate(URL url,
                         org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token)
                  throws IOException,
                         org.apache.hadoop.security.authentication.client.AuthenticationException
Specified by:
authenticate in interface org.apache.hadoop.security.authentication.client.Authenticator
Overrides:
authenticate in class org.apache.hadoop.security.authentication.client.KerberosAuthenticator
Throws:
IOException
org.apache.hadoop.security.authentication.client.AuthenticationException

getDelegationToken

public static org.apache.hadoop.security.token.Token<?> getDelegationToken(URI fsURI,
                                                                           InetSocketAddress httpFSAddr,
                                                                           org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
                                                                           String renewer)
                                                                    throws IOException
Throws:
IOException

renewDelegationToken

public static long renewDelegationToken(URI fsURI,
                                        org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
                                        org.apache.hadoop.security.token.Token<?> dToken)
                                 throws IOException
Throws:
IOException

cancelDelegationToken

public static void cancelDelegationToken(URI fsURI,
                                         org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
                                         org.apache.hadoop.security.token.Token<?> dToken)
                                  throws IOException
Throws:
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.