Class VaultService


  • public class VaultService
    extends java.lang.Object
    The 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.String getSecretValue​(java.lang.String strSecretPath, java.lang.String secretKey)
      Gets the secret value.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.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 Detail

      • getSecretsSubPath

        public java.util.List<java.lang.String> getSecretsSubPath​(java.lang.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 java.lang.String getSecretValue​(java.lang.String strSecretPath,
                                               java.lang.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 java.util.Map<java.lang.String,​java.lang.String> getAllSecretsByPath​(java.lang.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