Skip to content

docs(runbook): move the env file out of the checkout and add the secret rotation matrix - #82

Merged
matthew-demidoff merged 1 commit into
masterfrom
docs/secrets-relocation-rotation
Sep 6, 2026
Merged

matthew-demidoff merged 1 commit into
masterfrom
docs/secrets-relocation-rotation

Conversation

@matthew-demidoff

Copy link
Copy Markdown
Member

Docs-only (deployment guide, on-call runbook, .env.example header, one
README line). Second of the ops tranche.

  • docs/deployment.md: the production env file moves to
    ~/.config/bottleneck-auth/prod.env (0700/0600, PEMs beside it), loaded via
    COMPOSE_ENV_FILES exported once in the deploying shell; per-command
    --env-file as the fallback. Fails closed without the export. Migration
    steps for the existing host; dev-only values go in a separate file.
  • runbooks/oncall.md: replaces the four-line leak note with a Secrets
    section: where they live, a rotation matrix (consumers, restart set, blast
    radius, overlap) for all ten secrets, procedures for POSTGRES_PASSWORD
    (alter role over the socket, --no-deps restarts, the db recreate that a
    later full up -d triggers), the OIDC key with no downtime via retired
    status (verification and JWKS both include non-revoked keys, checked in
    lib/server/config.ts and services/oauth.ts), the bot token, the webhook
    secret, and the tunnel token; then a triage order for a suspected leak.
  • Every remaining reference to a repo-root .env is updated.

Deviation from the plan: AUTH_SECRETS_DIR is not added to .env.example yet.
Nothing consumes it until the backup sidecar lands (3.5); it will arrive with
that change.

Owner action after merge (no code change involved): perform the move on the
host as documented, then docker compose config --quiet && docker compose ps
in a fresh shell.

…et rotation matrix

Documents the production env file's new home (~/.config/bottleneck-auth/,
loaded through COMPOSE_ENV_FILES), the one-time migration, and why a .env in
the checkout should not exist.

Replaces the four-line "suspected leaked secret" note with a rotation matrix
that names every secret's consumers, its restart set, the blast radius of the
gap, and whether an overlap exists, plus step-by-step procedures for the ones
that are easy to get wrong: POSTGRES_PASSWORD (alter role over the socket,
then --no-deps restarts, and the db recreate that follows), the OIDC key via
retired status with no downtime, the bot token, the webhook secret, and the
tunnel token. Ends with a triage order for a suspected leak.
@matthew-demidoff
matthew-demidoff merged commit a23fa57 into master Sep 6, 2026
4 checks passed
@matthew-demidoff
matthew-demidoff deleted the docs/secrets-relocation-rotation branch September 6, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant