fix(compose): pass the two fail-closed secrets to the app container - #48
Merged
Conversation
The compose stack is the one deployment path where both landmines are armed: the image runs NODE_ENV=production and Mongo IS wired. Without AUDIT_HMAC_SECRET every audit write throws post-response (entries silently lost); without TOTP_ENCRYPTION_KEY 2FA setup/verify errors at runtime (fail closed by design since b7131d8 — and before that it was broken here anyway, since compose passes no NEXTAUTH_SECRET for the legacy fallback either). Require both with the same `:?` fail-fast treatment AUTH_SECRET already gets: an immediate, actionable error at `docker compose up` beats a silent audit gap and a 2FA error weeks later. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
"That's it, zero setup" predates the AUTH_SECRET requirement and now the audit/2FA keys too. Show the one-time openssl line that writes all three to .env (compose reads .env natively), and scope the Docker-ready highlight's "zero setup" claim honestly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Mutation TestingScore: 71.11% (break threshold 60% — ✅ pass). 320 detected / 450 valid mutants (killed 194, timeout 126, survived 29, no-coverage 101). Full report. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sibling of #46, found by auditing the remaining deployment path. The compose stack is the one where both landmines are armed: the image runs
NODE_ENV=production(Dockerfile:22) and Mongo is wired (MONGODB_URLpoints at the composemongoservice). So:AUDIT_HMAC_SECRET→ every audit write throws post-response — entries silently lost, on the only stack where the audit DB actually existsTOTP_ENCRYPTION_KEY→ 2FA setup/verify errors at runtime (fail-closed by design since fix(2fa): fail closed in production without TOTP_ENCRYPTION_KEY; accept AUTH_SECRET in dev #45 — and it was broken here before that too: compose passes noNEXTAUTH_SECRET, so the legacy fallback never applied)Both now get the same
:?fail-fast treatmentAUTH_SECRETalready had:docker compose uperrors immediately with a generate hint instead of degrading silently weeks later.Second commit (docs): the README quickstart said "That's it. … zero setup" — already inaccurate since
AUTH_SECRETbecame required, now off by three. It shows the one-timeopensslline that writes all three into.env(compose reads.envnatively) and scopes the highlight bullet's claim honestly.Verified: compose YAML parses with all 11 app env keys; full suite green through the pre-push hook (2835). Not runnable end-to-end here (no Docker on this machine) — the
:?syntax is the same construct the existingAUTH_SECRETline has used all along.🤖 Generated with Claude Code