shc vault rotate
shc vault rotate
Section titled “shc vault rotate”rotate the vault master password (re-encrypts every secret)
Synopsis
Section titled “Synopsis”Change the vault master password. Every secret is decrypted under the current password and re-encrypted under the new one in a single transaction, then this node switches to the new key. Requires an unlocked vault. Prompts for any password not passed via --old-password / --new-password.
On the genesis node the master password is also on disk, in the systemd drop-in that auto-unlocks the vault at boot. Rotation rewrites that drop-in in the same operation, and refuses before touching the vault if it cannot: a rotation that left the old password there would leave the node locked at its next restart with no auto-recovery.
Warning: passwords passed via flags are visible in shell history and the process list, prefer the interactive prompts (omit the flags).
shc vault rotate [flags]Options
Section titled “Options” --adopt-drop-in replace this node's vault auto-unlock systemd drop-in even when it already carries a password that is not the current master (a node stranded by an earlier rotation). Without it such a drop-in refuses the rotation rather than overwriting a password nobody can account for -h, --help help for rotate -N, --new-password string new vault password (prompts when empty) -O, --old-password string current vault password (prompts when empty)Options inherited from parent commands
Section titled “Options inherited from parent commands” --config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win -d, --debug enable debug mode (default: $SHC_DEBUG) -e, --environment string environment name (default: "prod", or "default" on an estate with no licence and no trial; $SHC_ENVIRONMENT and shc ctx -e override it, and the "master" tenant is always "default") --exclude string comma-separated dotted paths to drop --fields string comma-separated columns/keys to show (and their order) --filter string comma-separated dotted paths to keep (drops everything else) -o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT) -p, --password string vault password (visible in the process list, prefer --password-file) --password-file string read the vault password from a file (mode 0600 expected); use '-' to read stdin. Takes precedence over --password and never puts the secret in argv -s, --stack string stack name (default: $SHC_STACK) -t, --tenant string tenant name (default: $SHC_TENANT) -v, --verbose verbose output (default: $SHC_VERBOSE)SEE ALSO
Section titled “SEE ALSO”- shc vault - manage secrets and credentials