Skip to content
Vaulthalla LogoVaulthalla

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

vh secrets
CommandArgumentsAliasesEffectSummary
<secret> <file>set, modify, editwriteSet or update an internal secret.
<secret>get, downloadreadExport 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.
readShow 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).
destructiveReseal 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

vh secrets update <secret> <file> [--code <recovery-code>] [--yes]

secret set (an alias of secrets update) reads the secret value from the file path you pass.

vh secrets update
OptionAliasesTypeDefaultSummary
recovery-codemfa-pepper only: one of your own recovery codes (used or unused, it is not spent); the imported key must reproduce its stored hash.
flagDon't ask for confirmation.

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.

vh secrets export
OptionAliasesTypeDefaultSummary
-rgpg-fingerprintGPG fingerprint to encrypt the exported key (if blank will not encrypt).
-ofileOutput file for the exported key (if blank will print to stdout).

vh secrets master

vh secrets master
CommandArgumentsAliasesEffectSummary
showreadShow 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).
destructiveReplace a data-wrapping master without changing what it protects.
destructiveEnd the recovery window now: verify every row under the current master (--slot, default vault), then delete the previous master and the retained wraps.
destructiveInside 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 status [--slot <slot>] [--json]
vh secrets master status
OptionAliasesTypeDefaultSummary
slotvaultWhich master: vault (vault_master, the default), api-keys (ak_master), s3-gateway (s3gw_master), or all.
-jflagOutput in JSON format.

vh secrets master rotate

vh secrets master rotate [--slot <slot>] [--window-hours <hours>] [--batch <rows>] [--yes] [--json]
vh secrets master rotate
OptionAliasesTypeDefaultSummary
slotvaultWhich master: vault (vault_master, the default), api-keys (ak_master: provider API key secrets), s3-gateway (s3gw_master: S3 gateway credential secrets).
--windowhours168Recovery window in hours (1 to 2160).
rows200Key rows per staging transaction (1 to 10000).
flagDon't ask for confirmation.
-jflagOutput in JSON format.

vh secrets master finalize

vh secrets master finalize [--slot <slot>] [--yes] [--json]
vh secrets master finalize
OptionAliasesTypeDefaultSummary
slotvaultWhich master: vault (vault_master, the default), api-keys (ak_master: provider API key secrets), s3-gateway (s3gw_master: S3 gateway credential secrets).
flagDon't ask for confirmation.
-jflagOutput in JSON format.

vh secrets master rollback

vh secrets master rollback [--slot <slot>] [--yes] [--json]
vh secrets master rollback
OptionAliasesTypeDefaultSummary
slotvaultWhich master: vault (vault_master, the default), api-keys (ak_master: provider API key secrets), s3-gateway (s3gw_master: S3 gateway credential secrets).
flagDon't ask for confirmation.
-jflagOutput in JSON format.

vh secrets jwt

vh secrets jwt
CommandArgumentsAliasesEffectSummary
destructiveReplace the JWT secret that signs every session with a fresh one.

vh secrets jwt rotate

vh secrets jwt rotate [--yes] [--json]
vh secrets jwt rotate
OptionAliasesTypeDefaultSummary
flagDon't ask for confirmation.
-jflagOutput in JSON format.

vh secrets device-identity

vh secrets device-identity
CommandArgumentsAliasesEffectSummary
destructiveReplace 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]
vh secrets device-identity rotate
OptionAliasesTypeDefaultSummary
flagDon't ask for confirmation.
-jflagOutput in JSON format.
flagEmergency: tell no linked server and unlink every one (the identity key may be compromised).

vh secrets policy

vh secrets policy [--json]
vh secrets policy
OptionAliasesTypeDefaultSummary
-jflagOutput in JSON format.

vh secrets reseal

vh secrets reseal [--pcr7] [--none] [--yes] [--json]

reseal and policy are the opt-in TPM PCR 7 binding: Bind Secrets To Secure Boot.

vh secrets reseal
OptionAliasesTypeDefaultSummary
flagAssert that secrets.tpm_pcr_policy is pcr7 (the command reseals to what config.yaml says).
flagAssert that secrets.tpm_pcr_policy is none (removes the PCR 7 binding).
flagDon't ask for confirmation.
-jflagOutput in JSON format.