public interface Vault
Main entry point to Vault operations.
To access secrets in the vault, start with builder()
to create a new Vault instance.
Once you have a Vault instance, you can access secrets through engines.
To get access to secrets, use secrets(Engine)
.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
auth
(AuthMethod<T> method) Get access to authentication method.<T> T
auth
(AuthMethod<T> method, String path) Get access to authentication method, using a custom path.static Vault.Builder
builder()
Fluent API builder to construct new instances.static Vault
Create a Vault from configuration.<T extends Secrets>
TGet access to secrets using the provided engine, using the default mount point of that engine.<T extends Secrets>
TGet access to secrets using the provided engine, using a custom mount point.<T> T
Get access to sys operations on this Vault, such as to configure engines, policies etc.
-
Field Details
-
LIST
HTTPLIST
method used by several Vault engines.
-
-
Method Details
-
builder
Fluent API builder to construct new instances.- Returns:
- a new builder
-
create
Create a Vault from configuration.- Parameters:
config
- configuration- Returns:
- a new Vault
- See Also:
-
secrets
Get access to secrets using the provided engine, using the default mount point of that engine. -
secrets
Get access to secrets using the provided engine, using a custom mount point.- Type Parameters:
T
- type of theSecrets
the engine supports, such asKv2Secrets
- Parameters:
engine
- engine to use, such asKv2Secrets#ENGINE
mount
- mount point for the engine (such as when the same engine is configured more than once in the Vault)- Returns:
- instance of
Secrets
specific to the used engine
-
auth
Get access to authentication method.- Type Parameters:
T
- type of the API class used by the method- Parameters:
method
- method to use, such asio.helidon.integrations.vault.AuthMethod.TOKEN
- Returns:
- instance of the API class specific to the used method
-
auth
Get access to authentication method, using a custom path.- Type Parameters:
T
- type of the API class used by the method- Parameters:
method
- method to use, such asio.helidon.integrations.vault.AuthMethod.TOKEN
path
- path for the method, such as when configuring multiple instances of the same method- Returns:
- instance of the API class specific to the used method
-
sys
Get access to sys operations on this Vault, such as to configure engines, policies etc. (if such operations are supported).- Type Parameters:
T
- type of the API- Parameters:
api
- API implementation- Returns:
- API instance
-