public interface VaultSysOperations
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 . |
void |
createOrUpdatePolicy(String name,
Policy policy)
Create or update a
Policy . |
void |
deletePolicy(String name)
Delete a
Policy by its name. |
Map<String,VaultMount> |
getAuthMounts() |
Map<String,VaultMount> |
getMounts() |
Policy |
getPolicy(String name)
Read a
Policy by its name. |
List<String> |
getPolicyNames()
Lists policy names stored in Vault.
|
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.
|
boolean isInitialized() throws VaultException
VaultException
VaultInitializationResponse initialize(VaultInitializationRequest vaultInitializationRequest) throws VaultException
VaultInitializationRequest
.vaultInitializationRequest
- must not be null.VaultInitializationResponse
.VaultException
void seal() throws VaultException
VaultException
VaultUnsealStatus unseal(String keyShare) throws VaultException
VaultUnsealStatus.getProgress()
for progress.keyShare
- must not be empty and not null.VaultUnsealStatus
.VaultException
VaultUnsealStatus getUnsealStatus() throws VaultException
VaultUnsealStatus
.VaultException
void mount(String path, VaultMount vaultMount) throws VaultException
VaultMount
to path
.path
- must not be empty or null.vaultMount
- must not be null.VaultException
Map<String,VaultMount> getMounts() throws VaultException
Map
of all secret backend mounts
.VaultException
void unmount(String path) throws VaultException
path
.path
- must not be empty or null.VaultException
void authMount(String path, VaultMount vaultMount) throws VaultException
VaultMount
to path
.path
- must not be empty or null.vaultMount
- must not be null.VaultException
Map<String,VaultMount> getAuthMounts() throws VaultException
Map
of all auth backend mounts
.VaultException
void authUnmount(String path) throws VaultException
path
.path
- must not be empty or null.VaultException
List<String> getPolicyNames() throws VaultException
VaultException
@Nullable Policy getPolicy(String name) throws VaultException
Policy
by its name. Policies are either represented as
HCL (HashiCorp configuration language) or JSON. Retrieving policies is only
possible if the policy is represented as JSON.Policy
or null, if the policy was not found.UnsupportedOperationException
- if the policy is represented as HCL.VaultException
void createOrUpdatePolicy(String name, Policy policy) throws VaultException
Policy
.name
- the policy name, must not be null or empty.VaultException
void deletePolicy(String name) throws VaultException
Policy
by its name.name
- the policy name, must not be null or empty.VaultException
VaultHealth health() throws VaultException
VaultHealth
.VaultException
Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.