Class Seal


  • public class Seal
    extends java.lang.Object

    The implementing class for operations on REST endpoints, under the "seal/unseal/seal-status" section of the Vault HTTP API docs (https://www.vaultproject.io/api/system/index.html).

    This class is not intended to be constructed directly. Rather, it is meant to used by way of Vault in a DSL-style builder pattern. See the Javadoc comments of each public method for usage examples.

    • Constructor Summary

      Constructors 
      Constructor Description
      Seal​(VaultConfig config)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void seal()
      Seal the Vault.
      SealResponse sealStatus()
      Check progress of unsealing the Vault.
      SealResponse unseal​(java.lang.String key)
      Enter a single master key share to progress the unsealing of the Vault.
      SealResponse unseal​(java.lang.String key, java.lang.Boolean reset)
      Enter a single master key share to progress the unsealing of the Vault.
      Seal withNameSpace​(java.lang.String nameSpace)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • withNameSpace

        public Seal withNameSpace​(java.lang.String nameSpace)
      • seal

        public void seal()
                  throws VaultException

        Seal the Vault.

        Throws:
        VaultException - If any error occurs, or unexpected response received from Vault
      • unseal

        public SealResponse unseal​(java.lang.String key)
                            throws VaultException

        Enter a single master key share to progress the unsealing of the Vault.

        Parameters:
        key - Single master key share
        Returns:
        The response information returned from Vault
        Throws:
        VaultException - If any error occurs, or unexpected response received from Vault
      • unseal

        public SealResponse unseal​(java.lang.String key,
                                   java.lang.Boolean reset)
                            throws VaultException

        Enter a single master key share to progress the unsealing of the Vault.

        Parameters:
        key - Single master key share
        reset - Specifies if previously-provided unseal keys are discarded and the unseal process is reset
        Returns:
        The response information returned from Vault
        Throws:
        VaultException - If any error occurs, or unexpected response received from Vault
      • sealStatus

        public SealResponse sealStatus()
                                throws VaultException

        Check progress of unsealing the Vault.

        Returns:
        The response information returned from Vault
        Throws:
        VaultException - If any error occurs, or unexpected response received from Vault