Class VaultService

java.lang.Object
fr.paris.lutece.util.configsource.VaultService

public class VaultService extends Object
The Class VaultService.
  • 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 adress
      strVaultToken - 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 path
      secretKey - 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