Skip to content

Synchronize website-sandbox/database-url with the weekly RDS master rotation #191

Description

@alexeygrigorev

Evidence

The 2026-08-14 development outage tracked by #160 was caused by the RDS-managed master credentials of website-sandbox rotating on their 7-day schedule ("Reset master credentials" at 2026-08-14T13:12:27Z) while the application secret website-sandbox/database-url remained a static out-of-band copy. Web and worker tasks then failed password authentication failed for user "dtc_admin", /health/ready went 503, and every CI run failed at the deploy/capture gates with web captured terminal counts differ. Recovery on 2026-08-16 re-synced the secret manually (#160 recovery comment). The exact sandbox account, region, and RDS ARN are pinned in _docs/runbooks/development-release.md.

The managed rotation repeats every 7 days — next expected around 2026-08-21 — and will desync the static secret again unless a durable mechanism lands. The #160 recovery explicitly deferred this to its own issue and decision.

Owner decision required

Choose the durable mechanism; any of these is acceptable if it meets the acceptance criteria below:

  1. scheduled automatic re-sync of website-sandbox/database-url from the managed rds!db-* secret (bounded, redacted, fail-closed) ahead of task refresh;
  2. web/worker/migration tasks read the managed secret directly at task start;
  3. change or disable the managed rotation cadence with documented compensating controls.

Scope

Implement the chosen mechanism so development tasks keep authenticating across rotations without a manual operator step, fail loudly when synchronization cannot be proven, and add a detection signal for authentication-failure storms (log-based alert or CI gate) so a future desync is attributed in minutes rather than days. Update the development runbook with the chosen mechanism, its verification, and its failure attribution path.

Non-goals

  • No weakening of readiness, capture, or deploy fail-closed gates; no fallback credentials or fabricated data.
  • No RDS resizing or engine change, no production-account work, and no Terraform/IAM change beyond what the chosen mechanism strictly requires (such a change gets its own review).
  • No credentials, connection strings, or provider payloads in issues, comments, logs, or CI output.

Acceptance criteria

  • The owner records the chosen approach and its tradeoff in this issue before implementation starts.
  • A rotation-shaped verification proves tasks authenticate after a credential rotation without a manual secret update (safely staged rotation, or an equivalent contract test of the sync mechanism).
  • If synchronization cannot be proven within a bounded window after a rotation, the failure is loud (alert or red gate) and never silently continues serving stale credentials.
  • The Restore development database readiness for web.dtcdev.click #160 desync failure mode is reproduced or simulated and shown to be prevented or alerted by the mechanism.
  • Repeated password authentication failed events on /ecs/website-sandbox/web and /ecs/website-sandbox/worker have a detection path with a bounded attribution procedure recorded in the development runbook.
  • Development deploy/readiness gates keep their exact fail-closed success criteria; none is relaxed.

Dependencies

Scenarios

  • Operations: simulated rotation during a maintenance window with DEVELOPMENT_AUTO_DEPLOY=false, then proof that the next deploy/readiness cycle is green without manual secret edits.
  • Repository: contract tests for the sync/alert mechanism run in CI without secrets present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Must-have or release-blockingbugSomething isn't workingdecisionOwner decision requiredinfraArea: infraoperationsArea: operations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions