- java.lang.Object
-
- io.github.jopenlibs.vault.api.Seal
-
public class Seal extends java.lang.ObjectThe 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
Vaultin a DSL-style builder pattern. See the Javadoc comments of eachpublicmethod for usage examples.
-
-
Constructor Summary
Constructors Constructor Description Seal(VaultConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidseal()Seal the Vault.SealResponsesealStatus()Check progress of unsealing the Vault.SealResponseunseal(java.lang.String key)Enter a single master key share to progress the unsealing of the Vault.SealResponseunseal(java.lang.String key, java.lang.Boolean reset)Enter a single master key share to progress the unsealing of the Vault.SealwithNameSpace(java.lang.String nameSpace)
-
-
-
Constructor Detail
-
Seal
public Seal(VaultConfig config)
-
-
Method Detail
-
withNameSpace
public Seal withNameSpace(java.lang.String nameSpace)
-
seal
public void seal() throws VaultExceptionSeal 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 sharereset- 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
-
-