public class VaultSysTemplate extends Object implements VaultSysOperations
VaultSysOperations
.Constructor and Description |
---|
VaultSysTemplate(VaultOperations vaultOperations)
Create a new
VaultSysTemplate with the given VaultOperations . |
Modifier and Type | Method and Description |
---|---|
void |
authMount(String path,
VaultMount vaultMount)
Mounts an auth backend
VaultMount to path . |
void |
authUnmount(String path)
Unmounts the auth backend mount at
path . |
Map<String,VaultMount> |
getAuthMounts() |
Map<String,VaultMount> |
getMounts() |
VaultUnsealStatus |
getUnsealStatus() |
VaultHealth |
health()
Return the health status of Vault.
|
VaultInitializationResponse |
initialize(VaultInitializationRequest vaultInitializationRequest)
Initialize Vault with a
VaultInitializationRequest . |
boolean |
isInitialized() |
void |
mount(String path,
VaultMount vaultMount)
Mounts a secret backend
VaultMount to path . |
void |
seal()
Seal vault.
|
void |
unmount(String path)
Unmounts the secret backend mount at
path . |
VaultUnsealStatus |
unseal(String keyShare)
Unseal vault.
|
public VaultSysTemplate(VaultOperations vaultOperations)
VaultSysTemplate
with the given VaultOperations
.vaultOperations
- must not be null.public boolean isInitialized()
isInitialized
in interface VaultSysOperations
public VaultInitializationResponse initialize(VaultInitializationRequest vaultInitializationRequest)
VaultSysOperations
VaultInitializationRequest
.initialize
in interface VaultSysOperations
vaultInitializationRequest
- must not be null.VaultInitializationResponse
.public void seal()
VaultSysOperations
seal
in interface VaultSysOperations
public VaultUnsealStatus unseal(String keyShare)
VaultSysOperations
VaultUnsealStatus.getProgress()
for progress.unseal
in interface VaultSysOperations
keyShare
- must not be empty and not null.VaultUnsealStatus
.public VaultUnsealStatus getUnsealStatus()
getUnsealStatus
in interface VaultSysOperations
VaultUnsealStatus
.public void mount(String path, VaultMount vaultMount)
VaultSysOperations
VaultMount
to path
.mount
in interface VaultSysOperations
path
- must not be empty or null.vaultMount
- must not be null.public Map<String,VaultMount> getMounts()
getMounts
in interface VaultSysOperations
Map
of all secret backend mounts
.public void unmount(String path)
VaultSysOperations
path
.unmount
in interface VaultSysOperations
path
- must not be empty or null.public void authMount(String path, VaultMount vaultMount) throws VaultException
VaultSysOperations
VaultMount
to path
.authMount
in interface VaultSysOperations
path
- must not be empty or null.vaultMount
- must not be null.VaultException
public Map<String,VaultMount> getAuthMounts() throws VaultException
getAuthMounts
in interface VaultSysOperations
Map
of all auth backend mounts
.VaultException
public void authUnmount(String path) throws VaultException
VaultSysOperations
path
.authUnmount
in interface VaultSysOperations
path
- must not be empty or null.VaultException
public VaultHealth health()
VaultSysOperations
health
in interface VaultSysOperations
VaultHealth
.Copyright © 2016–2017 Pivotal Software, Inc.. All rights reserved.