public interface CredentialStoreService
Modifier and Type | Method and Description |
---|---|
boolean |
containsCredential(String clusterName,
String alias)
Tests to see if the requested alias exists in any CredentialStore
|
boolean |
containsCredential(String clusterName,
String alias,
CredentialStoreType credentialStoreType)
Tests to see if the requested alias exists in ether the persistent or the temporary CredentialStore
|
Credential |
getCredential(String clusterName,
String alias)
Retrieves the specified credential looking in the temporary and then the persistent CredentialStore
|
Credential |
getCredential(String clusterName,
String alias,
CredentialStoreType credentialStoreType)
Retrieves the specified credential looking in ether the persistent or the temporary CredentialStore
|
CredentialStoreType |
getCredentialStoreType(String clusterName,
String alias)
Gets the type of the credential store used to store the requested credential
|
boolean |
isInitialized()
Tests this CredentialStoreService to check if it has been properly initialized
|
boolean |
isInitialized(CredentialStoreType credentialStoreType)
Tests this CredentialStoreService to check if ether the persistent or the temporary CredentialStore
has been properly initialized
|
Map<String,CredentialStoreType> |
listCredentials(String clusterName)
Maps the existing alias names to their relevant credential store types.
|
void |
removeCredential(String clusterName,
String alias)
Removes the specified credential from all CredentialStores
|
void |
removeCredential(String clusterName,
String alias,
CredentialStoreType credentialStoreType)
Removes the specified credential from ether the persistent or the temporary CredentialStore
|
void |
setCredential(String clusterName,
String alias,
Credential credential,
CredentialStoreType credentialStoreType)
Adds a new credential to ether the persistent or the temporary CredentialStore
The supplied key will be converted into UTF-8 bytes before being stored.
|
void setCredential(String clusterName, String alias, Credential credential, CredentialStoreType credentialStoreType) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster the credential is related toalias
- a string declaring the alias (or name) of the credentialcredential
- the credential value to storecredentialStoreType
- a CredentialStoreType indicating which credential store facility to useorg.apache.ambari.server.AmbariException
- if an error occurs while storing the new credentialCredential getCredential(String clusterName, String alias) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster the credential is related toalias
- a string declaring the alias (or name) of the credentialorg.apache.ambari.server.AmbariException
- if an error occurs while retrieving the credentialCredential getCredential(String clusterName, String alias, CredentialStoreType credentialStoreType) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster this credential is related toalias
- a string declaring the alias (or name) of the credentialcredentialStoreType
- a CredentialStoreType indicating which credential store facility to useorg.apache.ambari.server.AmbariException
- if an error occurs while retrieving the credentialvoid removeCredential(String clusterName, String alias) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster this credential is related toalias
- a string declaring the alias (or name) of the credentialorg.apache.ambari.server.AmbariException
- if an error occurs while removing the credentialvoid removeCredential(String clusterName, String alias, CredentialStoreType credentialStoreType) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster this credential is related toalias
- a string declaring the alias (or name) of the credentialcredentialStoreType
- a CredentialStoreType indicating which credential store facility to useorg.apache.ambari.server.AmbariException
- if an error occurs while removing the credentialboolean containsCredential(String clusterName, String alias) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster this credential is related toalias
- a string declaring the alias (or name) of the credentialorg.apache.ambari.server.AmbariException
- if an error occurs while searching for the credentialboolean containsCredential(String clusterName, String alias, CredentialStoreType credentialStoreType) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster this credential is related toalias
- a string declaring the alias (or name) of the credentialcredentialStoreType
- a CredentialStoreType indicating which credential store facility to useorg.apache.ambari.server.AmbariException
- if an error occurs while searching for the credentialCredentialStoreType getCredentialStoreType(String clusterName, String alias) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster this credential is related toalias
- a string declaring the alias (or name) of the credentialorg.apache.ambari.server.AmbariException
- if an error occurs while searching for the credentialMap<String,CredentialStoreType> listCredentials(String clusterName) throws org.apache.ambari.server.AmbariException
clusterName
- the name of the cluster this credential is related toorg.apache.ambari.server.AmbariException
- if an error occurs while searching for the credentialsboolean isInitialized()
boolean isInitialized(CredentialStoreType credentialStoreType)
credentialStoreType
- a CredentialStoreType indicating which credential store facility to useCopyright © 2022 Apache Software Foundation. All rights reserved.