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#
rehearsal.testz.devis a second instance ofdns-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 carryprevent_destroy; the apex keeps both guards. It is behindenable_dnssec_rehearsal, andtofu testcovers the flag's off path.- A
dns-delegationmodule publishes its NS records and one DS RRset in the apex zone: a DS for each key withparent_ds = true, only after the child is signed. It takes any nameservers and DS records, so the plannedlab.testz.devcan use it, and it refuses records at the parent's own apex. - 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. Thealarm-delivery-testworkflow 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. - 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-zoneholds the zone and the KMS keys in two blocks each, chosen byprotect, becauselifecyclecannot take a variable. Amovedblock 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;
movedblocks 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.devis 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.