Class RandomSignerSecretProvider
java.lang.Object
org.apache.hadoop.security.authentication.util.SignerSecretProvider
org.apache.hadoop.security.authentication.util.RolloverSignerSecretProvider
org.apache.hadoop.security.authentication.util.RandomSignerSecretProvider
A SignerSecretProvider that uses a random number as its secret. It rolls
the secret at a regular interval.
-
Constructor Summary
ConstructorsConstructorDescriptionRandomSignerSecretProvider(long seed) This constructor lets you set the seed of the Random Number Generator and is meant for testing. -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]Subclasses should implement this to return a new secret.Methods inherited from class org.apache.hadoop.security.authentication.util.RolloverSignerSecretProvider
destroy, getAllSecrets, getCurrentSecret, init, initSecrets, rollSecret, startScheduler
-
Constructor Details
-
RandomSignerSecretProvider
public RandomSignerSecretProvider() -
RandomSignerSecretProvider
@VisibleForTesting public RandomSignerSecretProvider(long seed) This constructor lets you set the seed of the Random Number Generator and is meant for testing.- Parameters:
seed- the seed for the random number generator
-
-
Method Details
-
generateNewSecret
protected byte[] generateNewSecret()Description copied from class:RolloverSignerSecretProviderSubclasses should implement this to return a new secret. It will be called automatically at the secret rollover interval. It should never return null.- Specified by:
generateNewSecretin classRolloverSignerSecretProvider- Returns:
- a new secret
-