User Guide · Administer · HashiCorp Vault

HashiCorp Vault

Use your own HashiCorp Vault as the source of database passwords. Instead of typing a password into Jarwis, you give a reference to a Vault secret. Jarwis stores only the reference and reads the value when it needs it, so the password stays in Vault and is never written to the Jarwis database.

Your Vault, not ours Jarwis talks to your Vault through its HTTP API. Vault is not bundled or distributed with Jarwis; its server is licensed separately by its vendor.

Connect Vault

Go to Settings → Security → HashiCorp Vault (owners and admins). An organisation has one Vault connection.

FieldMeaning
Enable Vault as a credential sourceTurns the integration on.
Vault addressURL of your Vault. On the hosted service, private and loopback addresses are refused.
NamespaceOptional, for Vault namespaces.
Auth method, Auth mountHow Jarwis logs in, and the mount of that auth method. See below.
Default KV mountThe KV v2 mount used when you do not name one (secret by default).
Allowed path prefixOptional. Restricts which secret paths Jarwis may read.
Cache TTLHow long a read value is cached, in seconds (default 60; kept between 5 seconds and 1 hour).
CA certificateOptional PEM, if your Vault uses a private CA.

Auth methods

  • Token — a Vault token.
  • AppRole — a role ID and an AppRole secret_id.
  • Kubernetes — a Kubernetes role and the service account token file (under /var/run/secrets/ or /run/secrets/). Available only on a self-hosted controller.

The token or secret_id is stored encrypted and never shown again; leave the field empty when editing to keep it. Click Test connection to check that Vault is reachable, unsealed and that the login succeeds. The panel shows the last successful check or the last error.

Use a Vault secret

In the cluster install form and the form for importing an existing cluster, set Password source to From HashiCorp Vault and fill in:

  • KV v2 mount, Secret path (for example jarwis/prod-db) and Key inside that secret.
  • Version, or latest.

Click Check in Vault to confirm the secret exists. Only metadata is shown (for example Found … (version 3)); the password never leaves the controller. The stored reference has the form vault:kv:<mount>/<path>#<key>[@<version>].

The cluster's reveal screen shows the Vault reference as the password source instead of the value; read the password in Vault. The service account Jarwis creates itself (jarwis_admin) cannot come from Vault.

Rotation and caching

  • Jarwis caches a value for the Cache TTL and renews its Vault token before it expires.
  • After you rotate a secret in Vault, click Re-read secrets now to drop the cache so the next use reads the new value immediately.
  • Rotation happens in Vault. Changing the password inside the database engine (ALTER USER) is still your job; Jarwis simply uses the new value on the next read.

If Vault is down

Because the password is read at use time, a task that needs a Vault secret fails with a clear error when Vault cannot be reached, is sealed, rejects the login, or the secret or key is missing or not permitted. Checks in the install form fail the same way before anything starts.

Audit and removal

  • Every read, use and check of a Vault secret is written to the audit log with the reference but never the value.
  • Remove deletes the connection. While clusters still use Vault references, removal is refused; the panel shows Clusters using Vault references.

See also Security and Settings → Security.