Class WorkerTokenAuthorizer
java.lang.Object
org.apache.storm.security.auth.workertoken.WorkerTokenAuthorizer
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- PasswordProvider
Allow for SASL authentication using worker tokens.
- 
Constructor SummaryConstructorsConstructorDescriptionWorkerTokenAuthorizer(Map<String, Object> conf, ThriftConnectionType connectionType) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()static com.codahale.metrics.MeterOptional<char[]>getPasswordFor(String userName) Get an optional password for a user.Convert the supplied user name to the actual user name that should be used in the system.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.security.auth.sasl.PasswordProviderisImpersonationAllowed
- 
Constructor Details- 
WorkerTokenAuthorizerConstructor.- Parameters:
- conf- the daemon config for the server.
- connectionType- the type of connection we are authorizing.
 
 
- 
- 
Method Details- 
getPasswordForDescription copied from interface:PasswordProviderGet an optional password for a user. If no password for the user is found the option will be empty and another PasswordProvider would be tried.- Specified by:
- getPasswordForin interface- PasswordProvider
- Parameters:
- userName- the user this is for.
- Returns:
- the password if it is found.
 
- 
getPasswordFailuresMeterpublic static com.codahale.metrics.Meter getPasswordFailuresMeter()
- 
userNameDescription copied from interface:PasswordProviderConvert the supplied user name to the actual user name that should be used in the system. This may be called on any name. If it cannot be translated then a null may be returned or an exception thrown. If getPassword returns successfully this should not return null, nor throw an exception for the same user.- Specified by:
- userNamein interface- PasswordProvider
- Parameters:
- userName- the SASL negotiated user name.
- Returns:
- the user name that storm should use.
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
 
 
-