Package io.quarkus.vault.runtime
Class VaultSystemBackendManager
- java.lang.Object
-
- io.quarkus.vault.runtime.VaultSystemBackendManager
-
- All Implemented Interfaces:
VaultSystemBackendEngine
@ApplicationScoped public class VaultSystemBackendManager extends Object implements VaultSystemBackendEngine
-
-
Constructor Summary
Constructors Constructor Description VaultSystemBackendManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateUpdatePolicy(String name, String policy)Create or update a policy.voiddeletePolicy(String name)Delete a policy by its name.voiddisable(String mount)Disables the engine at a specific mount.voidenable(VaultSecretEngine engine, String mount, String description, EnableEngineOptions options)Enables a secret engine at a specific mount.voidenable(String engineType, String mount, String description, EnableEngineOptions options)Enables a secret engine at a specific mount.List<String>getPolicies()List existing policies.StringgetPolicyRules(String name)Get the rules for the named policy.VaultTuneInfogetTuneInfo(String mount)Get the tune info for a secret engine at a specific mount.VaultHealthhealth()Check the health status of Vault.VaultHealthStatushealthStatus()Check and return the health status of Vault.VaultInitinit(int secretShares, int secretThreshold)Initializes a new Vault.booleanisEngineMounted(String mount)Check if an engine is mounted at a specific mount.VaultSealStatussealStatus()Check the seal status of a Vault.voidupdateTuneInfo(String mount, VaultTuneInfo tuneInfoUpdates)Update the tune info for a secret engine at a specific mount.
-
-
-
Method Detail
-
init
public VaultInit init(int secretShares, int secretThreshold)
Description copied from interface:VaultSystemBackendEngineInitializes a new Vault.- Specified by:
initin interfaceVaultSystemBackendEngine- Parameters:
secretShares- specifies the number of shares to split the master key into.secretThreshold- specifies the number of shares required to reconstruct the master key.- Returns:
- Vault Init.
-
health
public VaultHealth health()
Description copied from interface:VaultSystemBackendEngineCheck the health status of Vault. Returns Vault health status code only by using HTTP HEAD requests. It is faster than callinghealthStatus()method which uses HTTP GET to return a complete VaultHealthStatus state.- Specified by:
healthin interfaceVaultSystemBackendEngine- Returns:
- Vault Health Status.
-
healthStatus
public VaultHealthStatus healthStatus()
Description copied from interface:VaultSystemBackendEngineCheck and return the health status of Vault. Returns a complete VaultHealthStatus state. This method uses HTTP GET to return a complete state.- Specified by:
healthStatusin interfaceVaultSystemBackendEngine- Returns:
- Complete Vault Health Status.
-
sealStatus
public VaultSealStatus sealStatus()
Description copied from interface:VaultSystemBackendEngineCheck the seal status of a Vault.- Specified by:
sealStatusin interfaceVaultSystemBackendEngine- Returns:
- Vault Seal Status.
-
getPolicyRules
public String getPolicyRules(String name)
Description copied from interface:VaultSystemBackendEngineGet the rules for the named policy.- Specified by:
getPolicyRulesin interfaceVaultSystemBackendEngine- Parameters:
name- of the policy- Returns:
- rules of named policy
-
createUpdatePolicy
public void createUpdatePolicy(String name, String policy)
Description copied from interface:VaultSystemBackendEngineCreate or update a policy.- Specified by:
createUpdatePolicyin interfaceVaultSystemBackendEngine- Parameters:
name- policy namepolicy- policy content
-
deletePolicy
public void deletePolicy(String name)
Description copied from interface:VaultSystemBackendEngineDelete a policy by its name.- Specified by:
deletePolicyin interfaceVaultSystemBackendEngine- Parameters:
name- policy name
-
getPolicies
public List<String> getPolicies()
Description copied from interface:VaultSystemBackendEngineList existing policies.- Specified by:
getPoliciesin interfaceVaultSystemBackendEngine- Returns:
- a list of all policy names
-
getTuneInfo
public VaultTuneInfo getTuneInfo(String mount)
Description copied from interface:VaultSystemBackendEngineGet the tune info for a secret engine at a specific mount.- Specified by:
getTuneInfoin interfaceVaultSystemBackendEngine- Parameters:
mount- Name of the mount- Returns:
- current tune info
-
updateTuneInfo
public void updateTuneInfo(String mount, VaultTuneInfo tuneInfoUpdates)
Description copied from interface:VaultSystemBackendEngineUpdate the tune info for a secret engine at a specific mount.- Specified by:
updateTuneInfoin interfaceVaultSystemBackendEngine- Parameters:
mount- Name of the mounttuneInfoUpdates- Tune info with fields to update
-
isEngineMounted
public boolean isEngineMounted(String mount)
Description copied from interface:VaultSystemBackendEngineCheck if an engine is mounted at a specific mount.- Specified by:
isEngineMountedin interfaceVaultSystemBackendEngine- Parameters:
mount- Name of the mount- Returns:
- True if an engine is mounted, false otherwise
-
enable
public void enable(VaultSecretEngine engine, String mount, String description, EnableEngineOptions options)
Description copied from interface:VaultSystemBackendEngineEnables a secret engine at a specific mount.- Specified by:
enablein interfaceVaultSystemBackendEngine- Parameters:
engine- Type of engine to mount.mount- Engine mount path.description- Human friendly description of mount point.options- Engine options.
-
enable
public void enable(String engineType, String mount, String description, EnableEngineOptions options)
Description copied from interface:VaultSystemBackendEngineEnables a secret engine at a specific mount.- Specified by:
enablein interfaceVaultSystemBackendEngine- Parameters:
engineType- Type of engine to mount.mount- Engine mount path.description- Human friendly description of mount point.options- Engine options.
-
disable
public void disable(String mount)
Description copied from interface:VaultSystemBackendEngineDisables the engine at a specific mount.- Specified by:
disablein interfaceVaultSystemBackendEngine- Parameters:
mount- Engine mount path.
-
-