ADR-0028: Key-signing keys are a map by name, each with its own KMS key#
- Status: accepted. Refines ADR-0003.
- Date: 2026-11-26
Context#
ADR-0003 decided against scheduled rotation of the key-signing key, and the rotation runbook exists for the day one is needed anyway: a key that cannot be recovered, or that may be compromised.
That runbook could not be followed. The dns-zone module held one key-signing key, at index 0, and its KMS key did not depend on the key's name. Renaming the key, as the runbook said to, replaced the key-signing key over the same KMS key: the same key material and the same DS record, so nothing rotated. The default order also planned to delete the old key-signing key before creating the new one. The root had no variable to rename it with, and the runbook's steps used local credentials that no person has.
A rollover in the double-DS style needs two keys side by side, each with its own material, for as long as both DS records may be cached.
Decision#
key_signing_keysis a map from name to{ status, parent_ds }, set interraform.tfvarsthrough the root'sdnssec_key_signing_keys. Each key gets its own KMS key, alias and key-signing key.statusis ACTIVE (signs the DNSKEY set) or INACTIVE (in the zone, not signing).parent_dssays whether its DS record belongs at the registrar. It drives the instructions in the apply run summary, and the registrar record when Terraform manages it.
- The module refuses unsafe shapes: more than two keys, no ACTIVE key, and a DS record at the parent for a key that is not ACTIVE.
movedblocks carry the existing key toksk1, so the change touches nothing in AWS.- The KMS keys keep
prevent_destroy. Retiring a key after a rollover lifts it for that one change, as teardown already does. - The hourly probe accepts a DS record for any of the keys (ADR-0027), so the overlap does not alarm.
Scheduled rotation is still not adopted: the reasoning in ADR-0003 stands.
Alternatives considered#
Two fixed resource slots (current and next). Simpler addresses, but a rollover ends with the keys in the wrong slots, or with a second move.
Rotate in the console. Leaves state describing a key that no longer signs, and is exactly the procedure that should be rehearsed, not improvised.
Keep one key and replace it in place. The domain would be unvalidated, or broken, until the new DS record reached every cache.
Consequences#
Positive: a rollover is a sequence of reviewed changes to one variable, each applied through terraform-apply. The tests cover a two-key overlap, a retiring key, and the refused shapes.
Negative: retiring a key needs a guard lifted on purpose. A second KMS key costs $1 a month while it exists. The rollover has not been rehearsed against a real zone; that is on the roadmap.
Neutral: the DS outputs are lists. The website's key tag lists every ACTIVE key.
Revisit when#
- The domain moves into Route 53 Domains, so Terraform can manage the DS records and the whole rollover becomes code (ADR-0003's condition too).
- Route 53 allows more than two key-signing keys, or a new algorithm.