- Task
- Version · 6.0.2
- Create
Use the Liquibase HashiCorp vault extension
Last updated: November 17, 2026
You can natively read your application secrets in Liquibase with the Hashicorp Vault extension. If you connect to your vault using the liquibase.properties file, you can store sensitive Liquibase authentication details such as database url, username, and password attributes, your Liquibase Secure license key, and the license endpoint settings in your vault.
For more information, see HashiCorp Vault documentation.
Before you begin
Liquibase 4.18.0+
HashiCorp Vault 1.4.x+ with
kvsecrets engine v1 or v2 enabledInstall the liquibase-hashicorp-vault extension
Procedure
Set the VAULT_ADDR and VAULT_TOKEN attributes as environment variables, as -D Java system properties, or in your liquibase.properties file, OR as a command line attribute.
In HashiCorp Vault, configure sensitive properties like your database username, password, URL, Liquibase Secure license key, and license endpoint settings as secrets.
Gather the Vault HTTP API path of each secret in your vault.
For example, /v1/secret/data/test_secrets.
Note: If you use kv secrets engine v1, your HTTP API path will look like /v1/secret/example. If you use kv secrets engine v2, the path uses an additional "data" prefix and will look like /v1/secret/data/example. (The version number at the beginning of the API path is from the Vault HTTP API and is not related to the version of kv you use.)
In your liquibase.properties file or other valid configuration location, specify each of those API paths as the values of Liquibase parameters, such as url.
Omit the
/v1/at the beginning of the API path. Use the syntaxVAULT, PATH, FIELD.If your
PATHincludes whitespace, you must surround it with quotes. For example:"secret/my path/".
License from the license endpoint
A node that gets its license from the license endpoint can read the endpoint URL in liquibase.license.endpointUrl and the access token in liquibase.platform.apiKey from HashiCorp Vault too. So can liquibase.license.cacheFile and liquibase.license.endpointTimeoutSeconds. Liquibase reads these four settings before the node has a license. Every other setting held in a secrets manager is read only after the node is licensed.
The following example sets every Liquibase Secure credential for a pipeline from HashiCorp Vault.
Be sure to:
Replace
your_vault_addresswith the address of your Vault server. For example,https://vault.example.com:8200Replace
your_vault_tokenwith a Vault token that can read the secret
If one of the four license settings cannot be resolved, the run is refused with LB-LIC-0029. The message names the setting and shows the HashiCorp Vault error.