Interface SecretRepository
-
- All Known Implementing Classes:
FileBaseSecretRepository
public interface SecretRepositoryRepresents the abstraction 'Repository of secret' Implementation can be any type - file,jdbc
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetEncryptedData(String alias)Returns the encrypted Value of provided alias name .SecretRepositorygetParent()Returns the parent secret repositoryStringgetSecret(String alias)Returns 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 Detail
-
init
void init(Properties properties, String id)
Initializes the repository based on provided properties- Parameters:
properties- Configuration propertiesid- Identifier to identify properties related to the corresponding repository
-
getSecret
String getSecret(String alias)
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
String getEncryptedData(String alias)
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
void setParent(SecretRepository parent)
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
-
-