ADR-0034: The health check compares the registry's delegation with the zone's own#
- Status: accepted. Extends ADR-0032.
- Date: 2026-11-27
Context#
The health check's delegation lines judged the shape of the NS and DS records a resolver returned: Route 53 nameservers, an algorithm-13 DS record. Any Route 53 zone passed, and so did a DS record for a key the zone does not serve. The script has no access to state, by design: its schedule holds no AWS credential.
The .dev registry's RDAP record, which the health check already reads (ADR-0032), lists the nameservers and DS records the registry holds (RFC 9083, section 5.3): the delegation itself, with no resolver in between. The zone's own nameservers serve its NS set and its DNSKEY set. A DS record names a key by key tag, algorithm and a digest over the owner name and the key (RFC 4034, section 5.1.4), so it can be checked against a DNSKEY set without knowing which key should be there. During a KSK rollover the zone serves two key-signing keys while the registry holds the DS record of one or both (ADR-0028).
The hourly probe compares the delegation with state through validating resolvers (ADR-0027).
Decision#
- The registry's nameservers are compared with what they serve. Each nameserver in the RDAP record is asked directly, without recursion, for the zone's NS set. Every one that answers must serve exactly the registry's set, compared as lower-case names without the final dot. It fails when one serves a different set or none, or when none answers; a nameserver that does not answer, while others do, is a warning.
- Each DS record the registry holds must match a key-signing key (flags 257) in the DNSKEY set served by the first nameserver that answered, by key tag, algorithm and digest, for SHA-256 and SHA-384. A key-signing key with no DS record passes, as in a rollover's first step; a DS record that matches no key fails. No DS record at the registry is a warning, as it is when the resolver sees none.
- A record that cannot be read fails both lines as not compared, as it fails the registration lines.
- The standard-library helper does the arithmetic: it reads the RDAP nameservers and
dsData, and computes the DS records of the DNSKEY setdigreturns. The shell judges. - The existing lines stay: the resolver's NS and DS records, Route 53 and algorithm 13 are decisions of their own (ADR-0003), and the resolver's view is the one visitors get.
- Tested against stubs (
make test-health): each failure above fails, two key-signing keys pass, and a fixed vector from the live zone and registry anchors the key tag and digest code.
This adds lines to an existing check, not a workflow, target or schedule, so ADR-0029 asks for nothing to retire.
Alternatives considered#
Give the health check state, through a CI role or a file of expected values. It would duplicate the probe, which already compares with state hourly, and a file of nameservers and key tags would need a pull request at every rollover.
Ask a resolver for the zone's NS and DNSKEY sets. One more party between the check and the zone, and a cached answer can hide a change for a TTL.
Compare key tags only. A key tag is 16 bits and not unique; the digest is the identity, and costs one hash.
Fail on a silent nameserver. One of four servers unreachable from a runner is not an outage, and an incident for it would teach the owner to ignore one.
Consequences#
Positive: a delegation to nameservers that do not serve it, or a DS record for a key the zone does not serve, fails within about half a day, without access to state. A rollover's DS step taken before the new key is published fails before that DS record is the only one.
Negative:
- It shows that the registry and the zone agree, not that the zone is the one OpenTofu manages. Someone who changes both nameservers and DS record at the registrar, to a zone of their own that is consistent with itself, passes; the probe and the pinned registrar remain the checks for that.
- Four more queries, straight to Route 53's nameservers, and the runner's UDP/53 must reach them.
- The DNSKEY set comes from one nameserver.
Neutral: the rehearsal zone is not covered; the health check reads only the apex's RDAP record.
Revisit when#
- The health check gains access to state, or the probe starts reading RDAP.
- Route 53's nameservers start answering differently from each other when nothing is wrong.
- The domain moves to a registry that does not publish
dsDataor nameservers over RDAP.