vh secrets
Reference for vh secrets - set and export internal secrets, rotate the data-wrapping masters, the JWT secret and the device identity, and bind sealed secrets to TPM PCR 7.
vh secrets (alias vh secret, used in the examples) manages the internal secrets the daemon uses: the database password, the JWT
secret that signs sessions, the MFA keys, and the masters that wrap vault keys, provider API key secrets and S3 gateway
credential secrets. Vault encryption keys have their own export, vh vault keys.
1vh secret set jwt-secret /root/jwt-secret2vh secret export all --recipient <gpg-fingerprint> --output /var/lib/vaulthalla/vaulthalla-secrets.json.gpg3vh secret master status --slot all # every data-wrapping master: version, rotation, window4sudo vh secret master rotate [--slot vault|api-keys|s3-gateway] [--window-hours <hours>]5vh secret master rollback|finalize [--slot vault|api-keys|s3-gateway]6sudo vh secret jwt rotate # everyone signs in again7sudo vh secret device-identity rotate # every paired device pairs again8vh secret policy # PCR 7 binding of the sealed secrets, last export, warnings9sudo vh secret reseal [--pcr7|--none] # rebind every sealed secret to secrets.tpm_pcr_policy
The master, JWT, device identity and reseal commands are for super admins, each asking to confirm (--yes without a
terminal), and none of these commands is available to agents. Treat exports as sensitive: prefer --recipient. See
Rotate The Vault Master and the sections after it.
Commands
| Command | Arguments | Aliases | Effect | Summary |
|---|---|---|---|---|
<secret> <file> | set, modify, edit | write | Set or update an internal secret. | |
<secret> | get, download | read | Export an internal secret (to stdout, or to an --output file the daemon writes: absolute path, mode 0600). | |
| Rotate a data-wrapping master: the vault master (every vault key; never file contents), the API key master (provider API key secrets) or the S3 gateway master (gateway credential secrets). | ||||
| The JWT secret that signs sessions. | ||||
| The device listener's identity (device_tls), pinned by every paired Desktop. | ||||
| read | Show how the sealed secrets of this host are bound: the configured policy (secrets.tpm_pcr_policy: none or pcr7), the policy each sealed secret carries, whether a hardware TPM seals them, when the last vh secret export all was taken, and any warning (a PCR 7 binding with no export newer than 30 days, secrets that do not match the configured policy). | |||
| destructive | Reseal every sealed secret of this host under the policy config.yaml names (secrets.tpm_pcr_policy: none or pcr7, read when the daemon started) at the current PCR values. |
vh secrets update
secret set (an alias of secrets update) reads the secret value from the file path you pass.
vh secrets export
vh secrets export <secret> [--recipient <gpg-fingerprint>] [--output <file>]vh secret export all records that an export was taken, which reseal --pcr7 requires within 24 hours.
| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-r | gpg-fingerprint | GPG fingerprint to encrypt the exported key (if blank will not encrypt). | ||
-o | file | Output file for the exported key (if blank will print to stdout). |
vh secrets master
| Command | Arguments | Aliases | Effect | Summary |
|---|---|---|---|---|
show | read | Show a master secret (the vault master unless --slot says otherwise): its version, how it is sealed, and any rotation in progress (the version being staged and how many rows are staged) or recovery window (the previous version, until when it is kept, how many rows still hold a retained wrap). | ||
| destructive | Replace a data-wrapping master without changing what it protects. | |||
| destructive | End the recovery window now: verify every row under the current master (--slot, default vault), then delete the previous master and the retained wraps. | |||
| destructive | Inside the recovery window: return every row to the previous master (--slot, default vault; from the retained wraps, verified first) and delete the newer one. |
vh secrets master status
vh secrets master rotate
vh secrets master rotate [--slot <slot>] [--window-hours <hours>] [--batch <rows>] [--yes] [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
slot | vault | Which master: vault (vault_master, the default), api-keys (ak_master: provider API key secrets), s3-gateway (s3gw_master: S3 gateway credential secrets). | ||
--window | hours | 168 | Recovery window in hours (1 to 2160). | |
rows | 200 | Key rows per staging transaction (1 to 10000). | ||
flag | Don't ask for confirmation. | |||
-j | flag | Output in JSON format. |
vh secrets master finalize
vh secrets master rollback
vh secrets jwt
| Command | Arguments | Aliases | Effect | Summary |
|---|---|---|---|---|
| destructive | Replace the JWT secret that signs every session with a fresh one. |
vh secrets jwt rotate
vh secrets device-identity
| Command | Arguments | Aliases | Effect | Summary |
|---|---|---|---|---|
| destructive | Replace the device listener's identity (the TLS key every paired Desktop pins) with a fresh one. |
vh secrets device-identity rotate
vh secrets device-identity rotate [--yes] [--json] [--revoke-peers]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
flag | Don't ask for confirmation. | |||
-j | flag | Output in JSON format. | ||
flag | Emergency: tell no linked server and unlink every one (the identity key may be compromised). |
vh secrets policy
vh secrets policy [--json]| Option | Aliases | Type | Default | Summary |
|---|---|---|---|---|
-j | flag | Output in JSON format. |
vh secrets reseal
reseal and policy are the opt-in TPM PCR 7 binding:
Bind Secrets To Secure Boot.
