public class SessionTokenIdentifier extends AbstractS3ATokenIdentifier
MarshalledCredentials
may trigger a transitive load of AWS classes, a load which will
fail if the aws SDK isn't on the classpath.
Note 2:
This class does support subclassing, but every subclass MUST declare itself
to be of a different token kind.
Otherwise the process for decoding tokens breaks.MAX_TEXT_LENGTH| Modifier | Constructor and Description |
|---|---|
|
SessionTokenIdentifier()
Constructor for service loader use.
|
protected |
SessionTokenIdentifier(org.apache.hadoop.io.Text kind)
Constructor for subclasses.
|
|
SessionTokenIdentifier(org.apache.hadoop.io.Text kind,
org.apache.hadoop.io.Text owner,
org.apache.hadoop.io.Text renewer,
org.apache.hadoop.io.Text realUser,
URI uri)
Constructor.
|
|
SessionTokenIdentifier(org.apache.hadoop.io.Text kind,
org.apache.hadoop.io.Text owner,
org.apache.hadoop.io.Text renewer,
URI uri,
MarshalledCredentials marshalledCredentials,
EncryptionSecrets encryptionSecrets,
String origin)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getExpiryTime()
Return the expiry time in seconds since 1970-01-01.
|
MarshalledCredentials |
getMarshalledCredentials()
Get the marshalled credentials.
|
void |
readFields(DataInput in)
Read state.
|
String |
toString()
Add the (sanitized) marshalled credentials to the string value.
|
void |
write(DataOutput out)
Write state.
|
createDefaultOriginMessage, equals, getBucket, getCreated, getEncryptionSecrets, getOrigin, getUri, getUuid, hashCode, setOrigin, validategetKindgetIssueDate, getMasterKeyId, getMaxDate, getOwner, getRealUser, getRenewer, getSequenceNumber, getUser, isEqual, setIssueDate, setMasterKeyId, setMaxDate, setOwner, setRealUser, setRenewer, setSequenceNumber, toStringStablepublic SessionTokenIdentifier()
DelegationConstants.SESSION_TOKEN_KIND.
Subclasses MUST NOT subclass this; they must provide their own
token kind.protected SessionTokenIdentifier(org.apache.hadoop.io.Text kind)
kind - kind of token identifier, for storage in the
token kind to implementation map.public SessionTokenIdentifier(org.apache.hadoop.io.Text kind,
org.apache.hadoop.io.Text owner,
org.apache.hadoop.io.Text renewer,
URI uri,
MarshalledCredentials marshalledCredentials,
EncryptionSecrets encryptionSecrets,
String origin)
kind - token kind.owner - token owner.renewer - token renewer.uri - filesystem URI.marshalledCredentials - credentials to marshallencryptionSecrets - encryption secretsorigin - origin text for diagnostics.public SessionTokenIdentifier(org.apache.hadoop.io.Text kind,
org.apache.hadoop.io.Text owner,
org.apache.hadoop.io.Text renewer,
org.apache.hadoop.io.Text realUser,
URI uri)
kind - token kind.owner - token ownerrenewer - token renewerrealUser - real user running over proxy useruri - filesystem URI.public void write(DataOutput out) throws IOException
AbstractS3ATokenIdentifierWritable.write(DataOutput).write in interface org.apache.hadoop.io.Writablewrite in class AbstractS3ATokenIdentifierout - destinationIOException - failurepublic void readFields(DataInput in) throws IOException
AbstractS3ATokenIdentifierWritable.readFields(DataInput).
Note: this operation gets called in toString() operations on tokens, so
must either always succeed, or throw an IOException to trigger the
catch and downgrade. RuntimeExceptions (e.g. Preconditions checks) are
not to be used here for this reason.)readFields in interface org.apache.hadoop.io.WritablereadFields in class AbstractS3ATokenIdentifierin - input streamDelegationTokenIOException - if the token binding is wrong.IOException - IO problems.public long getExpiryTime()
getExpiryTime in class AbstractS3ATokenIdentifierpublic MarshalledCredentials getMarshalledCredentials()
public String toString()
toString in class AbstractS3ATokenIdentifierCopyright © 2008–2024 Apache Software Foundation. All rights reserved.