KeyStoreProvider, LocalKeyStoreProvider@Private public abstract class AbstractJavaKeyStoreProvider extends CredentialProvider
CredentialProvider.CredentialEntry| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
CREDENTIAL_PASSWORD_DEFAULT |
|
static java.lang.String |
CREDENTIAL_PASSWORD_ENV_VAR |
|
static java.lang.String |
CREDENTIAL_PASSWORD_FILE_KEY |
|
static org.slf4j.Logger |
LOG |
CLEAR_TEXT_FALLBACK| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractJavaKeyStoreProvider(java.net.URI uri,
Configuration conf) |
| Modifier and Type | Method | Description |
|---|---|---|
static char[] |
bytesToChars(byte[] bytes) |
|
CredentialProvider.CredentialEntry |
createCredentialEntry(java.lang.String alias,
char[] credential) |
Create a new credential.
|
protected abstract void |
createPermissions(java.lang.String perms) |
|
void |
deleteCredentialEntry(java.lang.String name) |
Delete the given credential.
|
void |
flush() |
Ensures that any changes to the credentials are written to persistent
store.
|
protected abstract java.lang.String |
getAlgorithm() |
|
java.util.List<java.lang.String> |
getAliases() |
Get the aliases for all credentials.
|
protected Configuration |
getConf() |
|
CredentialProvider.CredentialEntry |
getCredentialEntry(java.lang.String alias) |
Get the credential entry for a specific alias.
|
protected abstract java.io.InputStream |
getInputStreamForFile() |
|
java.security.KeyStore |
getKeyStore() |
|
protected abstract java.lang.String |
getKeyStoreType() |
|
protected abstract java.io.OutputStream |
getOutputStreamForKeystore() |
|
char[] |
getPassword() |
|
Path |
getPath() |
|
protected java.lang.String |
getPathAsString() |
|
java.util.concurrent.locks.Lock |
getReadLock() |
|
protected abstract java.lang.String |
getSchemeName() |
|
java.net.URI |
getUri() |
|
java.util.concurrent.locks.Lock |
getWriteLock() |
|
protected void |
initFileSystem(java.net.URI keystoreUri) |
|
boolean |
isChanged() |
|
protected abstract boolean |
keystoreExists() |
|
boolean |
needsPassword() |
Does this provider require a password? This means that a password is
required for normal operation, and it has not been found through normal
means.
|
java.lang.String |
noPasswordError() |
If a password for the provider is needed, but is not provided, this will
return an error message and instructions for supplying said password to
the provider.
|
java.lang.String |
noPasswordWarning() |
If a password for the provider is needed, but is not provided, this will
return a warning and instructions for supplying said password to the
provider.
|
void |
setChanged(boolean chg) |
|
void |
setPassword(char[] pass) |
|
void |
setPath(Path p) |
|
void |
setReadLock(java.util.concurrent.locks.Lock rl) |
|
void |
setWriteLock(java.util.concurrent.locks.Lock wl) |
|
protected abstract void |
stashOriginalFilePermissions() |
|
java.lang.String |
toString() |
isTransientpublic static final org.slf4j.Logger LOG
public static final java.lang.String CREDENTIAL_PASSWORD_ENV_VAR
public static final java.lang.String CREDENTIAL_PASSWORD_FILE_KEY
public static final java.lang.String CREDENTIAL_PASSWORD_DEFAULT
protected AbstractJavaKeyStoreProvider(java.net.URI uri,
Configuration conf)
throws java.io.IOException
java.io.IOExceptionprotected Configuration getConf()
public Path getPath()
public void setPath(Path p)
public char[] getPassword()
public void setPassword(char[] pass)
public boolean isChanged()
public void setChanged(boolean chg)
public java.util.concurrent.locks.Lock getReadLock()
public void setReadLock(java.util.concurrent.locks.Lock rl)
public java.util.concurrent.locks.Lock getWriteLock()
public void setWriteLock(java.util.concurrent.locks.Lock wl)
public java.net.URI getUri()
public java.security.KeyStore getKeyStore()
protected final java.lang.String getPathAsString()
protected abstract java.lang.String getSchemeName()
protected abstract java.lang.String getKeyStoreType()
protected abstract java.lang.String getAlgorithm()
protected abstract java.io.OutputStream getOutputStreamForKeystore()
throws java.io.IOException
java.io.IOExceptionprotected abstract boolean keystoreExists()
throws java.io.IOException
java.io.IOExceptionprotected abstract java.io.InputStream getInputStreamForFile()
throws java.io.IOException
java.io.IOExceptionprotected abstract void createPermissions(java.lang.String perms)
throws java.io.IOException
java.io.IOExceptionprotected abstract void stashOriginalFilePermissions()
throws java.io.IOException
java.io.IOExceptionprotected void initFileSystem(java.net.URI keystoreUri)
throws java.io.IOException
java.io.IOExceptionpublic CredentialProvider.CredentialEntry getCredentialEntry(java.lang.String alias) throws java.io.IOException
CredentialProvidergetCredentialEntry in class CredentialProvideralias - the name of a specific credentialjava.io.IOException - raised on errors performing I/O.public static char[] bytesToChars(byte[] bytes)
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<java.lang.String> getAliases()
throws java.io.IOException
CredentialProvidergetAliases in class CredentialProviderjava.io.IOException - raised on errors performing I/O.public CredentialProvider.CredentialEntry createCredentialEntry(java.lang.String alias, char[] credential) throws java.io.IOException
CredentialProvidercreateCredentialEntry in class CredentialProvideralias - the alias of the credentialcredential - the credential value for the alias.java.io.IOException - raised on errors performing I/O.public void deleteCredentialEntry(java.lang.String name)
throws java.io.IOException
CredentialProviderdeleteCredentialEntry in class CredentialProvidername - the alias of the credential to deletejava.io.IOException - raised on errors performing I/O.public void flush()
throws java.io.IOException
CredentialProviderflush in class CredentialProviderjava.io.IOException - raised on errors performing I/O.public boolean needsPassword()
throws java.io.IOException
CredentialProviderneedsPassword in class CredentialProviderjava.io.IOException - raised on errors performing I/O.public java.lang.String noPasswordWarning()
CredentialProvidernoPasswordWarning in class CredentialProviderpublic java.lang.String noPasswordError()
CredentialProvidernoPasswordError in class CredentialProviderpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.