java.lang.Object
io.github.jopenlibs.vault.api.OperationsBase
io.github.jopenlibs.vault.api.sys.Seal

public class Seal extends OperationsBase

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 Details

  • Method Details

    • withNameSpace

      public Seal withNameSpace(String nameSpace)
    • seal

      public SealResponse seal() throws VaultException

      Seal the Vault.

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

      public SealResponse unseal(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(String key, 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