Package org.wso2.securevault.secret
Class SecretManager
java.lang.Object
org.wso2.securevault.secret.SecretManager
Entry point for manage secrets
-
Method Summary
Modifier and TypeMethodDescriptiongetEncryptedData(String alias) Returns the encrypted value corresponding to the given alias namestatic SecretManagerReturns the secret corresponding to the given alias namevoidinit(Properties properties) Initializes the Secret Manager by providing configuration propertiesbooleanresolveSecret(String secretAnnotation) Split the secret annotation from the delimiter provided and decides whether to use the legacy provider or a novel provider to obtain the secret value of the requested alias.void
-
Method Details
-
getInstance
-
init
Initializes the Secret Manager by providing configuration properties- Parameters:
properties- Configuration properties
-
resolveSecret
Split the secret annotation from the delimiter provided and decides whether to use the legacy provider or a novel provider to obtain the secret value of the requested alias.- Parameters:
secretAnnotation- String contains the alias, the provider type and the repository type.- Returns:
- Plain text value of the required secret.
-
getSecret
Returns the secret corresponding to the given alias name- Parameters:
alias- The logical or alias name- Returns:
- If there is a secret , otherwise , alias itself
-
getEncryptedData
Returns the encrypted value corresponding to the given alias name- Parameters:
alias- The logical or alias name- Returns:
- If there is a encrypted value , otherwise , alias itself
-
isInitialized
public boolean isInitialized() -
shoutDown
public void shoutDown() -
getGlobalSecretProvider
-