Class VaultService
java.lang.Object
fr.paris.lutece.util.configsource.VaultService
The Class VaultService.
-
Constructor Summary
ConstructorsConstructorDescriptionVaultService(String strAdress, String strVaultToken, String strRoleId, String strSecretId) Instantiates a new vault service. -
Method Summary
Modifier and TypeMethodDescriptiongetAllSecretsByPath(String strSecretPath) Gets the all secrets key by path.getSecretsSubPath(String strSecretPath) Gets the listy of secrets sub path.getSecretValue(String strSecretPath, String secretKey) Gets the secret value.
-
Constructor Details
-
VaultService
public VaultService(String strAdress, String strVaultToken, String strRoleId, String strSecretId) throws com.bettercloud.vault.VaultException Instantiates a new vault service.- Parameters:
strAdress- the str adressstrVaultToken- the str vault token- Throws:
com.bettercloud.vault.VaultException- the vault exception
-
-
Method Details
-
getSecretsSubPath
public List<String> getSecretsSubPath(String strSecretPath) throws com.bettercloud.vault.VaultException Gets the listy of secrets sub path.- Parameters:
strSecretPath- the str secret path- Returns:
- the all secrets key by path
- Throws:
com.bettercloud.vault.VaultException- the vault exception
-
getSecretValue
public String getSecretValue(String strSecretPath, String secretKey) throws com.bettercloud.vault.VaultException Gets the secret value.- Parameters:
strSecretPath- the str secret pathsecretKey- the secret key- Returns:
- the secret value
- Throws:
com.bettercloud.vault.VaultException- the vault exception
-
getAllSecretsByPath
public Map<String,String> getAllSecretsByPath(String strSecretPath) throws com.bettercloud.vault.VaultException Gets the all secrets key by path.- Parameters:
strSecretPath- the str secret path- Returns:
- the all secrets key by path
- Throws:
com.bettercloud.vault.VaultException- the vault exception
-