Interface SecretRepository
- All Known Implementing Classes:
FileBaseSecretRepository
public interface SecretRepository
Represents the abstraction 'Repository of secret'
Implementation can be any type - file,jdbc
-
Method Summary
Modifier and TypeMethodDescriptiongetEncryptedData(String alias) Returns the encrypted Value of provided alias name .Returns the parent secret repositoryReturns the secret of provided alias name .voidinit(Properties properties, String id) Initializes the repository based on provided propertiesvoidsetParent(SecretRepository parent) Sets the parent secret repository Secret Repositories are made a chain so that , one can get a secret from other.
-
Method Details
-
init
Initializes the repository based on provided properties- Parameters:
properties- Configuration propertiesid- Identifier to identify properties related to the corresponding repository
-
getSecret
Returns the secret of provided alias name . An alias represents the logical name for a look up secret- Parameters:
alias- Alias name for look up a secret- Returns:
- Secret if there is any , otherwise ,alias itself
-
getEncryptedData
Returns the encrypted Value of provided alias name . An alias represents the logical name for a look up secret- Parameters:
alias- Alias name for look up a secret- Returns:
- encrypted Value if there is any , otherwise ,alias itself
-
setParent
Sets the parent secret repository Secret Repositories are made a chain so that , one can get a secret from other. For example, JDBC password can be in file based secret repository- Parameters:
parent- Parent secret repository
-
getParent
SecretRepository getParent()Returns the parent secret repository- Returns:
- Parent secret repository
-