DNSSEC#
The zone is signed with ECDSA P-256 (RFC 6605). This page covers how the chain of trust is built, why P-256, and — most importantly — the several ways this can take the domain completely offline.
As deployed#
| Property | Value |
|---|---|
| Zone signed | yes |
| Signing algorithm | ECDSAP256SHA256 (13) |
| Digest algorithm | SHA-256 (2) |
| Key tag | 57490 |
| Key storage | AWS KMS, asymmetric ECC_NIST_P256, private key non-exportable |
| DS record managed by Terraform | no |
| External validation probe | cron(7 * * * ? *) UTC, DNS over HTTPS (RFC 8484); needs 2 of cloudflare, google, nextdns to agree |
What DNSSEC actually does#
It authenticates DNS responses (RFC 4033). It does not encrypt them: DNSSEC and DNS-over-HTTPS (RFC 8484) solve different problems and are complementary, not alternatives. A signed zone proves that the answer you received is the answer the zone operator published, and that a NXDOMAIN is genuinely a NXDOMAIN rather than a resolver lying to you.
Without it, anyone able to inject a DNS response — a hostile resolver, a captive portal, an on-path attacker — can point this domain wherever they like. HTTPS would catch that on the connection attempt, but only after the client had already been misdirected, and only for protocols that validate certificates.
The chain of trust#
flowchart TB
ROOT["Root zone<br/>trust anchor in every validating resolver"]
TLD[".dev zone<br/>operated by Google Registry"]
DS["DS record for testz.dev<br/>published at the registrar"]
KSK["Key Signing Key<br/>ECDSA P-256 in AWS KMS"]
ZSK["Zone Signing Key<br/>managed by Route 53"]
RR["A · AAAA · HTTPS · CAA · MX · TXT<br/>each with an RRSIG"]
ROOT -->|"signs"| TLD
TLD -->|"contains"| DS
DS -->|"is a hash of"| KSK
KSK -->|"signs the DNSKEY set, which contains"| ZSK
ZSK -->|"signs"| RREach link is a signature over the next. Break any one and validating resolvers return SERVFAIL — not a warning, not a downgrade. The domain simply stops resolving.
The DS record is the only link we cannot publish ourselves while the domain is at an external registrar. Route 53 signs the zone; the registrar passes the DS to the .dev registry. See the DS record runbook.
Why ECDSA P-256 (algorithm 13)#
| RSA-2048 (alg 8) | ECDSA P-256 (alg 13) | |
|---|---|---|
| Signature size | ~256 bytes | ~64 bytes |
| DNSKEY size | ~256 bytes | ~64 bytes |
| Validation cost | Cheap | Slightly more expensive |
| Signing cost | Expensive | Cheap |
Size is what matters for DNS. A signed response has to carry RRSIG records alongside the answers, and the traditional 512-byte UDP limit is unforgiving. Oversized responses mean either IP fragmentation — which many firewalls drop, producing intermittent resolution failures that are miserable to debug — or fallback to TCP, which adds a round trip to every lookup.
P-256 keeps typical signed responses inside a single datagram. It is also what Route 53 supports, and it matches the ECDSA P-256 TLS certificate the site serves, so DNS and TLS sit on the same curve.
Ed25519 (algorithm 15, RFC 8080) would be a marginally better choice on the merits — smaller still, and no dependence on getting nonce generation right. Route 53 does not offer it, so it is on the tech radar under Hold.
Key custody#
The key-signing key is an asymmetric KMS key with key_usage = SIGN_VERIFY and spec ECC_NIST_P256. The private key never leaves KMS and cannot be exported. Route 53's signing service is granted kms:Sign, kms:GetPublicKey and kms:DescribeKey — it asks KMS to produce signatures rather than ever holding the key.
The key policy includes confused-deputy protection:
condition {
test = "StringEquals"
variable = "aws:SourceAccount"
values = [data.aws_caller_identity.current.account_id]
}
condition {
test = "ArnLike"
variable = "aws:SourceArn"
values = ["arn:aws:route53:::hostedzone/*"]
}
Without those conditions, the Route 53 DNSSEC service would happily sign another AWS account's hosted zone with this key, because the service principal is shared across all customers.
The key must be in us-east-1. This is a Route 53 constraint, and the module asserts it with a precondition rather than letting the failure surface later as a confusing error.
How this breaks — read before touching anything#
DNSSEC is a hard-fail protocol. Every item below makes the domain unresolvable for validating resolvers, which is most of the internet:
- Deleting or disabling the KMS key. Signatures cannot be produced; existing
ones expire. Guarded by prevent_destroy and a 30-day deletion window.
- Setting the KSK to
INACTIVEwhile the DS record is live. The published DS
no longer corresponds to an active key.
- Destroying and recreating the hosted zone. New nameservers and a new
KSK, so both the NS delegation and the DS record are wrong. Guarded by prevent_destroy.
- Removing zone signing before removing the DS record. The registry still
asserts the zone is signed; the zone is not. Ordering matters — see the emergency runbook.
- Letting KMS fail. Rare, but it is what the
DNSSECKeySigningKeysNeedingAction alarm exists for.
The insidious property is that you may not notice. If your own resolver does not validate, the site looks fine to you while being unreachable for everyone whose resolver does. That asymmetry is why the CloudWatch alarms in the guardrails module are the most important monitoring in the stack.
Those alarms cannot see the registrar's side. If the DS record stops matching the key, Route 53 goes on signing correctly and reports nothing, while every validating resolver returns SERVFAIL. Only a probe from outside sees that. The CloudWatch alarms were verified on 2026-11-24 by the alarm-delivery-test workflow: a forced ALARM and OK both reached the alert inbox (ADR-0018).
Watching it from outside#
An hourly probe asks three public validating resolvers (Cloudflare, Google and NextDNS, over DNS-over-HTTPS) whether the zone validates. Two must agree before it raises or clears an alarm, so one resolver's bad hour does neither. A broken verdict alarms through the alert topic within minutes of the run; a probe that reaches no verdict for three hours raises a second alarm, so a stopped probe cannot pass for a healthy zone (ADR-0020, runbook). The External validation probe row in the table at the top of this page is generated from the deployed configuration.
In force since 25 November 2026, and verified end to end: the probe was made to fail against a deliberately broken zone, the alarm fired and reached the alert inbox, and it cleared when the probe next found this zone validating. Before it, the only external check was the dns-health workflow, which GitHub started 4½ to 12 hours late.
Verifying it works#
# Is the zone signed, and does the DS record exist at the registry?
dig +short DS testz.dev @1.1.1.1
dig +dnssec +short A testz.dev @1.1.1.1
# Does a validating resolver set the "ad" (authenticated data) flag?
dig +dnssec A testz.dev @1.1.1.1 | grep -E '^;;.*flags'
# Trace the whole chain and show each validation step.
delv @1.1.1.1 testz.dev A +rtrace
# Deliberately query a known-bad signature to confirm your resolver validates
# at all — this must SERVFAIL. If it returns an answer, your resolver is not
# validating and your own testing is meaningless.
dig @1.1.1.1 dnssec-failed.org A
The scheduled health-check workflow, dns-health, runs the equivalent of these twice a day, because a chain of trust that was correct at apply time is not necessarily correct next month. It is the full report and opens an issue on failure. Only a run that checks testz.dev from main opens, updates or closes that issue; a manual run against another domain, or from a branch, reports only (ADR-0022). The hourly probe above is the punctual alarm for the chain of trust alone.
Rotation#
Rotating the KSK means creating a second key with a different name, publishing both DS records, waiting for propagation, then retiring the first. It is not an in-place update — which is why key_signing_key_name is a variable rather than a hardcoded string. See the rotation runbook.
There is no automatic rotation schedule. For a personal domain with an externally-managed DS record, a rotation that requires a manual registrar update is more likely to cause an outage than to prevent a compromise — the key is non-exportable and lives in KMS. This is a considered tradeoff, not an oversight.