ADR-0031: Rehearse the DNSSEC runbooks on a signed child zone, then tear it down#

  • Status: accepted
  • Date: 2026-11-26

Context#

The key-signing key rollover (ADR-0028) and Scenario C of the emergency runbook have never run against a real zone. Either can take the domain offline, which outranks everything else (principles), so neither should first run on the apex. Principle 6 names the place: a delegated subdomain.

Route 53 can serve a child zone and hold its DS as a record in the apex zone, so the child's whole chain of trust is code, and each registrar step becomes a reviewed change to a variable. A second signed zone costs $1.50 a month, taking the bill from about $1.55 to $3.05 (cost), and its hourly probe is a scheduled job (ADR-0029).

The roadmap left one question open: keep the zone as a permanent canary, or tear it down.

Decision#

  1. rehearsal.testz.dev is a second instance of dns-zone, signed, with its own key map, dnssec_rehearsal_key_signing_keys, and its own KMS keys. It passes a new input, protect = false, so neither its zone nor its keys carry prevent_destroy; the apex keeps both guards. It is behind enable_dnssec_rehearsal, and tofu test covers the flag's off path.
  2. A dns-delegation module publishes its NS records and one DS RRset in the apex zone: a DS for each key with parent_ds = true, only after the child is signed. It takes any nameservers and DS records, so the planned lab.testz.dev can use it, and it refuses records at the parent's own apex.
  3. The child gets what the apex has: a second probe instance (testz-prod-rehearsal-, at minute 37) and Route 53's two DNSSEC alarms on its zone, on the existing topic. The alarm-delivery-test workflow is not extended: these alarms share its tested topic and module, and rehearsing Scenario C fires the child's chain-of-trust alarm through the real path.
  4. Tear it down once both runbooks have run against it. The flag stays, so the next rehearsal, before a real rollover of the apex's key, is one variable away. Teardown is two changes, neither touching a guard: the DS leaves the apex and its TTL passes, then the flag goes off (teardown runbook).

Alternatives considered#

Keep it as a permanent canary. Always ready. Lost on value for cost: it doubles the bill, and between rehearsals watches nothing the apex's probe and alarms do not. A $3.05 bill also crosses the budget's 50% notification every month, so keeping it means raising the budget. A zone rebuilt from code rehearses as well.

Share the apex's KMS key ($0.50 a month, not $1.50). Retiring the child's first key, the last step of a rollover, would schedule the apex's for deletion.

Lift prevent_destroy in dns-zone to tear the child down. One block per resource, but the apex's zone and keys would be unguarded for that change, with only a reviewer between a wrong plan and the domain.

A second registered domain. The only option that rehearses the registrar's DS step. Lost on cost and risk: a second registration and zone, and a second domain to keep from expiring or being taken.

Rehearse on the apex. Precedence 1.

No probe or alarms for the child. A rehearsal would not show what the apex's alerting shows.

Consequences#

Positive: both runbooks can run where a mistake costs only the child. The DS-in-code delegation is the pattern lab.testz.dev needs. The probe is shown to work below the apex, where its control is testz.dev.

Negative:

  • About $1.50 a month while the zone exists, and nine of CloudWatch's ten free alarm metrics in use.
  • A second scheduled job. Nothing is retired for it, because it goes with the zone.
  • The registrar step is not rehearsed: its interface, its checks and the registry's delay.
  • dns-zone holds the zone and the KMS keys in two blocks each, chosen by protect, because lifecycle cannot take a variable. A moved block keeps the apex's zone where it is, and a test fails if either zone's resources land in the other's blocks.
  • Retiring a rehearsal key lifts no guard, so that part of the apex's rollover is not rehearsed.
  • The guardrails module's DNSSEC alarms become one pair per signed zone; moved blocks keep the apex's where they are.

Neutral: the website's DNS table lists the delegation while it exists.

Revisit when#

  • A rollover of the apex's key is planned: rebuild the zone, rehearse first.
  • The domain moves into Route 53 Domains, which makes the apex's DS code too.
  • lab.testz.dev is built, giving the project a permanent signed child anyway.
  • A rehearsal finds a runbook wrong in a way one run cannot settle: keep the zone until a second run passes.

Built 2026-12-01 from commit 5f3eb2c4b04f9d8367364b6f4598a05a364e2263. This page was generated from the same source that provisions the infrastructure it describes.