org.apache.hadoop.security.authentication.client.AuthenticatorKerberosDelegationTokenAuthenticator, MaprDelegationTokenAuthenticator, PseudoDelegationTokenAuthenticator@Public
@Evolving
public abstract class DelegationTokenAuthenticator
extends java.lang.Object
implements org.apache.hadoop.security.authentication.client.Authenticator
Authenticator wrapper that enhances an Authenticator with
Delegation Token support.| Modifier and Type | Class | Description |
|---|---|---|
static class |
DelegationTokenAuthenticator.DelegationTokenOperation |
DelegationToken operations.
|
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
DELEGATION_PARAM |
|
static java.lang.String |
DELEGATION_TOKEN_HEADER |
|
static java.lang.String |
DELEGATION_TOKEN_JSON |
|
static java.lang.String |
DELEGATION_TOKEN_URL_STRING_JSON |
|
static java.lang.String |
OP_PARAM |
|
static java.lang.String |
RENEW_DELEGATION_TOKEN_JSON |
|
static java.lang.String |
RENEWER_PARAM |
|
static java.lang.String |
SERVICE_PARAM |
|
static java.lang.String |
TOKEN_PARAM |
| Constructor | Description |
|---|---|
DelegationTokenAuthenticator(org.apache.hadoop.security.authentication.client.Authenticator authenticator) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
authenticate(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token) |
|
void |
cancelDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
Token<AbstractDelegationTokenIdentifier> dToken) |
Cancels a delegation token from the server end-point.
|
void |
cancelDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
Token<AbstractDelegationTokenIdentifier> dToken,
java.lang.String doAsUser) |
Cancels a delegation token from the server end-point.
|
Token<AbstractDelegationTokenIdentifier> |
getDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
java.lang.String renewer) |
Requests a delegation token using the configured
Authenticator
for authentication. |
Token<AbstractDelegationTokenIdentifier> |
getDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
java.lang.String renewer,
java.lang.String doAsUser) |
Requests a delegation token using the configured
Authenticator
for authentication. |
long |
renewDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
Token<AbstractDelegationTokenIdentifier> dToken) |
Renews a delegation token from the server end-point using the
configured
Authenticator for authentication. |
long |
renewDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
Token<AbstractDelegationTokenIdentifier> dToken,
java.lang.String doAsUser) |
Renews a delegation token from the server end-point using the
configured
Authenticator for authentication. |
void |
setConnectionConfigurator(org.apache.hadoop.security.authentication.client.ConnectionConfigurator configurator) |
public static final java.lang.String OP_PARAM
public static final java.lang.String DELEGATION_TOKEN_HEADER
public static final java.lang.String DELEGATION_PARAM
public static final java.lang.String TOKEN_PARAM
public static final java.lang.String RENEWER_PARAM
public static final java.lang.String SERVICE_PARAM
public static final java.lang.String DELEGATION_TOKEN_JSON
public static final java.lang.String DELEGATION_TOKEN_URL_STRING_JSON
public static final java.lang.String RENEW_DELEGATION_TOKEN_JSON
public DelegationTokenAuthenticator(org.apache.hadoop.security.authentication.client.Authenticator authenticator)
public void setConnectionConfigurator(org.apache.hadoop.security.authentication.client.ConnectionConfigurator configurator)
setConnectionConfigurator in interface org.apache.hadoop.security.authentication.client.Authenticatorpublic void authenticate(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token)
throws java.io.IOException,
org.apache.hadoop.security.authentication.client.AuthenticationException
authenticate in interface org.apache.hadoop.security.authentication.client.Authenticatorjava.io.IOExceptionorg.apache.hadoop.security.authentication.client.AuthenticationExceptionpublic Token<AbstractDelegationTokenIdentifier> getDelegationToken(java.net.URL url, org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token, java.lang.String renewer) throws java.io.IOException, org.apache.hadoop.security.authentication.client.AuthenticationException
Authenticator
for authentication.url - the URL to get the delegation token from. Only HTTP/S URLs are
supported.token - the authentication token being used for the user where the
Delegation token will be stored.renewer - the renewer user.java.io.IOException - if an IO error occurred.org.apache.hadoop.security.authentication.client.AuthenticationException - if an authentication exception occurred.public Token<AbstractDelegationTokenIdentifier> getDelegationToken(java.net.URL url, org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token, java.lang.String renewer, java.lang.String doAsUser) throws java.io.IOException, org.apache.hadoop.security.authentication.client.AuthenticationException
Authenticator
for authentication.url - the URL to get the delegation token from. Only HTTP/S URLs are
supported.token - the authentication token being used for the user where the
Delegation token will be stored.renewer - the renewer user.doAsUser - the user to do as, which will be the token owner.java.io.IOException - if an IO error occurred.org.apache.hadoop.security.authentication.client.AuthenticationException - if an authentication exception occurred.public long renewDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
Token<AbstractDelegationTokenIdentifier> dToken)
throws java.io.IOException,
org.apache.hadoop.security.authentication.client.AuthenticationException
Authenticator for authentication.url - the URL to renew the delegation token from. Only HTTP/S URLs are
supported.token - the authentication token with the Delegation Token to renew.dToken - abstract delegation token identifier.java.io.IOException - if an IO error occurred.org.apache.hadoop.security.authentication.client.AuthenticationException - if an authentication exception occurred.public long renewDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
Token<AbstractDelegationTokenIdentifier> dToken,
java.lang.String doAsUser)
throws java.io.IOException,
org.apache.hadoop.security.authentication.client.AuthenticationException
Authenticator for authentication.url - the URL to renew the delegation token from. Only HTTP/S URLs are
supported.token - the authentication token with the Delegation Token to renew.doAsUser - the user to do as, which will be the token owner.dToken - abstract delegation token identifier.java.io.IOException - if an IO error occurred.org.apache.hadoop.security.authentication.client.AuthenticationException - if an authentication exception occurred.public void cancelDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
Token<AbstractDelegationTokenIdentifier> dToken)
throws java.io.IOException
Authenticator.url - the URL to cancel the delegation token from. Only HTTP/S URLs
are supported.token - the authentication token with the Delegation Token to cancel.dToken - abstract delegation token identifier.java.io.IOException - if an IO error occurred.public void cancelDelegationToken(java.net.URL url,
org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token,
Token<AbstractDelegationTokenIdentifier> dToken,
java.lang.String doAsUser)
throws java.io.IOException
Authenticator.url - the URL to cancel the delegation token from. Only HTTP/S URLs
are supported.token - the authentication token with the Delegation Token to cancel.dToken - abstract delegation token identifier.doAsUser - the user to do as, which will be the token owner.java.io.IOException - if an IO error occurred.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.