public abstract class AbstractDelegationTokenBinding
extends org.apache.hadoop.service.AbstractService
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractDelegationTokenBinding.TokenSecretManager
The secret manager always uses the same secret; the factory for new identifiers is that of the
token manager.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier> |
secretManager |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDelegationTokenBinding(String name,
org.apache.hadoop.io.Text kind) |
protected |
AbstractDelegationTokenBinding(org.apache.hadoop.io.Text kind) |
| Modifier and Type | Method and Description |
|---|---|
void |
bindToFileSystem(GoogleHadoopFileSystemBase fs,
org.apache.hadoop.io.Text service)
Bind to the filesystem.
|
abstract AccessTokenProvider |
bindToTokenIdentifier(org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier retrievedIdentifier)
Bind to the token identifier, returning the credential providers to use for the owner to talk
to GCP services.
|
protected <T extends org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier> |
convertTokenIdentifier(org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier identifier,
Class<T> expectedClass)
Verify that a token identifier is of a specific class.
|
org.apache.hadoop.security.token.Token<org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier> |
createDelegationToken(String renewer)
Create a delegation token for the user.
|
abstract org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier |
createEmptyIdentifier()
Create a new "empty" token identifier.
|
abstract org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier |
createTokenIdentifier()
Create a token identifier with all the information needed to be included in a delegation token.
|
abstract org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier |
createTokenIdentifier(org.apache.hadoop.io.Text renewer)
Create a token identifier with all the information needed to be included in a delegation token.
|
abstract AccessTokenProvider |
deployUnbonded()
Perform any actions when deploying unbonded, and return a list of credential providers.
|
GoogleHadoopFileSystemBase |
getFileSystem()
Returns the bound file system
|
org.apache.hadoop.io.Text |
getKind() |
org.apache.hadoop.io.Text |
getService() |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier> secretManager
protected AbstractDelegationTokenBinding(org.apache.hadoop.io.Text kind)
protected AbstractDelegationTokenBinding(String name, org.apache.hadoop.io.Text kind)
public org.apache.hadoop.io.Text getKind()
public GoogleHadoopFileSystemBase getFileSystem()
public org.apache.hadoop.io.Text getService()
public abstract AccessTokenProvider deployUnbonded() throws IOException
IOException - any failure.public abstract AccessTokenProvider bindToTokenIdentifier(org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier retrievedIdentifier) throws IOException
retrievedIdentifier - the unmarshalled dataIOException - any failure.public void bindToFileSystem(GoogleHadoopFileSystemBase fs, org.apache.hadoop.io.Text service)
init().
Important: This binding will happen during FileSystem.initialize(); the FS is not live for actual use and will not yet have interacted with GCS services.
fs - owning FS.service - name of the service (i.e. bucket name) for the FS.public org.apache.hadoop.security.token.Token<org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier> createDelegationToken(String renewer) throws IOException
IOException - if one cannot be createdpublic abstract org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier createTokenIdentifier(org.apache.hadoop.io.Text renewer)
throws IOException
If createDelegationToken(java.lang.String) is overridden, this method can be replaced with a stub.
IOException - failure creating the token data.public abstract org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier createTokenIdentifier()
throws IOException
If createDelegationToken(java.lang.String) is overridden, this method can be replaced with a stub.
IOException - failure creating the token data.public abstract org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier createEmptyIdentifier()
protected <T extends org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier> T convertTokenIdentifier(org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier identifier,
Class<T> expectedClass)
throws DelegationTokenIOException
instanceof, then cast it to that type.identifier - identifier to validateexpectedClass - class of the expected token identifier.DelegationTokenIOException - If the wrong class was found.Copyright © 2023. All rights reserved.