Promote to production #158
Loading…
Reference in a new issue
No description provided.
Delete branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Promotion: staging passed. Run
scripts/plan-prod.shlocally before mergingMerging this PR is the approval record; it deploys nothing. Then check out the validated commit and run
scripts/promote-prod.sh(orscripts/deploy-services.sh --tags ... --limit servicesfor an Ansible-only change); both refuse any other commit.Staging validation: passed on commit
e456921651(this run)Production drift check: clean
Ansible preview (staging clone, synthetic secrets — approximate, not exact prod values)
The vault holds VAULTWARDEN_ADMIN_TOKEN as an Argon2 PHC string ($argon2id$v=19$m=65536,t=2,p=4$<salt>$<hash>). The compose template injected it unescaped, so Docker Compose expanded every $... as an unset variable and the container received "=19=65536,t=2,p=4" (17 characters, confirmed on services). Vaultwarden treats a non-PHC ADMIN_TOKEN as a plaintext password, so /admin accepted that predictable string and no real token ever worked. /admin is behind Authelia, so this broke the second layer, not the only one. - Template: replace('$', '$$'). Checked with a real container on services and a sample hash: the old line yields "=19=65536,t=2,p=4", the fixed one the hash byte-for-byte. - validate-services.yml (staging): assert the running ADMIN_TOKEN equals the vault's, no_log, so this cannot come back silently. - rotate-secret.sh: hash with the argon2 CLI only (the `docker run vaultwarden/server hash` path never worked: the image's entrypoint is not the binary) and fail instead of silently storing the plaintext; the Bitwarden note body is now the token alone (also LLDAP), without the *_PLAIN= prefix. - gen-auth-secrets.sh: drop the same dead docker branch (it would have left the token empty). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ