Java Vault Connector
Usage Examples
Connection
The package features an HTTP connector by default.
To establish connection to your Vault cluster, the connector needs to be instantiated with the relevant parameters.
To do so, use the builder to configure your connector.
Simple instantiation
Provide custom CA certificate
For internal sites or to enforce a specific CA you might provide a custom CA certificate to trust as Path
or X509Certificate
.
Configuration from environment variables
It is also possible to provide the configuration externally through environment variables.
This feature supports the default Vault environment variables:
VAULT_ADDR
- URL to Vault cluster (e.g. https://vault.example.com:8200)
VAULT_CACERT
- Path to custom CA certificate
VAULT_MAX_RETRIES
- Maximum number of retries on connection failure
VAULT_TOKEN
- Token for automatic authentication.