Class VaultService
- java.lang.Object
-
- fr.paris.lutece.util.configsource.VaultService
-
public class VaultService extends java.lang.ObjectThe Class VaultService.
-
-
Constructor Summary
Constructors Constructor Description VaultService(java.lang.String strAdress, java.lang.String strVaultToken, java.lang.String strRoleId, java.lang.String strSecretId)Instantiates a new vault service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>getAllSecretsByPath(java.lang.String strSecretPath)Gets the all secrets key by path.java.util.List<java.lang.String>getSecretsSubPath(java.lang.String strSecretPath)Gets the listy of secrets sub path.java.lang.StringgetSecretValue(java.lang.String strSecretPath, java.lang.String secretKey)Gets the secret value.
-
-
-
Constructor Detail
-
VaultService
public VaultService(java.lang.String strAdress, java.lang.String strVaultToken, java.lang.String strRoleId, java.lang.String strSecretId) throws com.bettercloud.vault.VaultExceptionInstantiates a new vault service.- Parameters:
strAdress- the str adressstrVaultToken- the str vault token- Throws:
com.bettercloud.vault.VaultException- the vault exception
-
-
Method Detail
-
getSecretsSubPath
public java.util.List<java.lang.String> getSecretsSubPath(java.lang.String strSecretPath) throws com.bettercloud.vault.VaultExceptionGets 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 java.lang.String getSecretValue(java.lang.String strSecretPath, java.lang.String secretKey) throws com.bettercloud.vault.VaultExceptionGets 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 java.util.Map<java.lang.String,java.lang.String> getAllSecretsByPath(java.lang.String strSecretPath) throws com.bettercloud.vault.VaultExceptionGets 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
-
-