Package org.apache.hadoop.security.alias
Class UserProvider
java.lang.Object
org.apache.hadoop.security.alias.CredentialProvider
org.apache.hadoop.security.alias.UserProvider
A CredentialProvider for UGIs. It uses the credentials object associated
with the current user to find credentials. This provider is created using a
URI of "user:///".
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.hadoop.security.alias.CredentialProvider
CredentialProvider.CredentialEntry -
Field Summary
FieldsFields inherited from class org.apache.hadoop.security.alias.CredentialProvider
CLEAR_TEXT_FALLBACK -
Method Summary
Modifier and TypeMethodDescriptioncreateCredentialEntry(String name, char[] credential) Create a new credential.voiddeleteCredentialEntry(String name) Delete the given credential.voidflush()Ensures that any changes to the credentials are written to persistent store.Get the aliases for all credentials.getCredentialEntry(String alias) Get the credential entry for a specific alias.booleanIndicates whether this provider represents a store that is intended for transient use - such as the UserProvider is.toString()Methods inherited from class org.apache.hadoop.security.alias.CredentialProvider
needsPassword, noPasswordError, noPasswordWarning
-
Field Details
-
SCHEME_NAME
- See Also:
-
-
Method Details
-
isTransient
public boolean isTransient()Description copied from class:CredentialProviderIndicates whether this provider represents a store that is intended for transient use - such as the UserProvider is. These providers are generally used to provide job access to passwords rather than for long term storage.- Overrides:
isTransientin classCredentialProvider- Returns:
- true if transient, false otherwise
-
getCredentialEntry
Description copied from class:CredentialProviderGet the credential entry for a specific alias.- Specified by:
getCredentialEntryin classCredentialProvider- Parameters:
alias- the name of a specific credential- Returns:
- the credentialEntry
-
createCredentialEntry
public CredentialProvider.CredentialEntry createCredentialEntry(String name, char[] credential) throws IOException Description copied from class:CredentialProviderCreate a new credential. The given alias must not already exist.- Specified by:
createCredentialEntryin classCredentialProvider- Parameters:
name- the alias of the credentialcredential- the credential value for the alias.- Returns:
- CredentialEntry.
- Throws:
IOException- raised on errors performing I/O.
-
deleteCredentialEntry
Description copied from class:CredentialProviderDelete the given credential.- Specified by:
deleteCredentialEntryin classCredentialProvider- Parameters:
name- the alias of the credential to delete- Throws:
IOException- raised on errors performing I/O.
-
toString
-
flush
public void flush()Description copied from class:CredentialProviderEnsures that any changes to the credentials are written to persistent store.- Specified by:
flushin classCredentialProvider
-
getAliases
Description copied from class:CredentialProviderGet the aliases for all credentials.- Specified by:
getAliasesin classCredentialProvider- Returns:
- the list of alias names
- Throws:
IOException- raised on errors performing I/O.
-