Package org.apache.accumulo.core.rpc
Class SaslDigestCallbackHandler
- java.lang.Object
-
- org.apache.accumulo.core.rpc.SaslDigestCallbackHandler
-
- All Implemented Interfaces:
CallbackHandler
- Direct Known Subclasses:
SaslClientDigestCallbackHandler
public abstract class SaslDigestCallbackHandler extends Object implements CallbackHandler
Common serialization methods across the client and server callback handlers for SASL. Serialization and deserialization methods must be kept in sync.
-
-
Constructor Summary
Constructors Constructor Description SaslDigestCallbackHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decodeIdentifier(String identifier)Decode the encodedTokenIdentifierinto bytes suitable to reconstitute the identifier.StringencodeIdentifier(byte[] identifier)Encode the serializedTokenIdentifierinto aString.char[]encodePassword(byte[] password)Encode the token password into a character array.<T extends org.apache.hadoop.security.token.TokenIdentifier>
char[]getPassword(org.apache.hadoop.security.token.SecretManager<T> secretManager, T tokenid)Generate the password from the providedSecretManagerandTokenIdentifier.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.security.auth.callback.CallbackHandler
handle
-
-
-
-
Method Detail
-
encodeIdentifier
public String encodeIdentifier(byte[] identifier)
Encode the serializedTokenIdentifierinto aString.- Parameters:
identifier- The serialized identifier- See Also:
decodeIdentifier(String)
-
encodePassword
public char[] encodePassword(byte[] password)
Encode the token password into a character array.- Parameters:
password- The token password- See Also:
getPassword(SecretManager, TokenIdentifier)
-
getPassword
public <T extends org.apache.hadoop.security.token.TokenIdentifier> char[] getPassword(org.apache.hadoop.security.token.SecretManager<T> secretManager, T tokenid) throws org.apache.hadoop.security.token.SecretManager.InvalidTokenGenerate the password from the providedSecretManagerandTokenIdentifier.- Parameters:
secretManager- The server SecretManagertokenid- The TokenIdentifier from the client- Throws:
org.apache.hadoop.security.token.SecretManager.InvalidToken- See Also:
encodePassword(byte[])
-
decodeIdentifier
public byte[] decodeIdentifier(String identifier)
Decode the encodedTokenIdentifierinto bytes suitable to reconstitute the identifier.- Parameters:
identifier- The encoded, serializedTokenIdentifier- See Also:
encodeIdentifier(byte[])
-
-