public class JassPasswordProvider extends Object implements PasswordProvider
Provides passwords out of a jaas conf for typical MD5-DIGEST authentication support.
Modifier and Type | Field and Description |
---|---|
static String |
SYSPROP_SUPER_PASSWORD
The system property that sets a super user password.
|
Constructor and Description |
---|
JassPasswordProvider(Map<String,Object> topoConf)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Optional<char[]> |
getPasswordFor(String user)
Get an optional password for a user.
|
boolean |
isImpersonationAllowed()
Should impersonation be allowed by this password provider.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
userName
public static final String SYSPROP_SUPER_PASSWORD
The system property that sets a super user password. This can be used in addition to the jaas conf, and takes precedent over a “super” user in the jaas conf if this is set.
public JassPasswordProvider(Map<String,Object> topoConf) throws IOException
Constructor.
topoConf
- the configuration containing the jaas conf to use.IOException
- if we could not read the Server section in the jaas conf.public Optional<char[]> getPasswordFor(String user)
PasswordProvider
Get 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.
getPasswordFor
in interface PasswordProvider
user
- the user this is for.public boolean isImpersonationAllowed()
PasswordProvider
Should impersonation be allowed by this password provider. The default is false.
isImpersonationAllowed
in interface PasswordProvider
Copyright © 2020 The Apache Software Foundation. All rights reserved.