Adding or removing a key in a child zone updates the DS set of a parent zone hosted on the same server #306

Merged
claude merged 5 commits from feature/48-parent-ds-on-child-key-change into develop 2026-11-05 12:15:19 -05:00
Owner

A key change in a child zone now updates the DS set of a parent zone hosted on the same server at once, instead of at the parent's next signing (up to about 25 days).

How:

  • After each reload of a signed zone, SignedZoneCache compares the zone's name and a fingerprint of its DS-generating keys (Active KSKs with a permitted algorithm; one rule, DelegationDsKeys, shared with the DS generator in ZoneSigningService). When it changed, it re-signs the closest locally hosted parent (LocalParentLocator, extracted from the rollover service).
  • Covered: key created, removed, retired or revoked; rollover promotion; DNSSEC on or off; child deleted; child renamed (old and new parent). A ZSK-only change leaves the parent alone.
  • The parent's SOA serial goes up through the same bump the scheduled re-sign uses, so secondaries transfer the new DS (this also fixes the same gap on rollover promotion).
  • A failed parent bump or sign is logged and retried at the child's next reload; the state is stored only after success. README says when that next reload happens.
  • The parent is signed twice per child DS change (the explicit sign, which reports success for the retry, and the reload fired by the bump's change event); the reason is in a comment.

Known, unchanged gaps: on a cluster peer sharing the database, a key-only change is picked up only when that peer reloads the child (scheduled re-sign, restart or another change); algorithm-policy changes and backup restore do not trigger a parent re-sign by themselves.

Tests: ParentDsFollowsChildKeyChangeTests (10, real SQLite host; red first for create, remove, remove-last, unsign, serial, rename and retry; delete and grandchild are guards). Authoritative.Tests 670, Dnssec.Tests 129, Web.Tests 2081 (without Docker), rollover tests 11, new class stable over 5 runs. Build 0 warnings. Reviewed three times by the verifier.

Closes #48

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

A key change in a child zone now updates the DS set of a parent zone hosted on the same server at once, instead of at the parent's next signing (up to about 25 days). How: - After each reload of a signed zone, `SignedZoneCache` compares the zone's name and a fingerprint of its DS-generating keys (Active KSKs with a permitted algorithm; one rule, `DelegationDsKeys`, shared with the DS generator in `ZoneSigningService`). When it changed, it re-signs the closest locally hosted parent (`LocalParentLocator`, extracted from the rollover service). - Covered: key created, removed, retired or revoked; rollover promotion; DNSSEC on or off; child deleted; child renamed (old and new parent). A ZSK-only change leaves the parent alone. - The parent's SOA serial goes up through the same bump the scheduled re-sign uses, so secondaries transfer the new DS (this also fixes the same gap on rollover promotion). - A failed parent bump or sign is logged and retried at the child's next reload; the state is stored only after success. README says when that next reload happens. - The parent is signed twice per child DS change (the explicit sign, which reports success for the retry, and the reload fired by the bump's change event); the reason is in a comment. Known, unchanged gaps: on a cluster peer sharing the database, a key-only change is picked up only when that peer reloads the child (scheduled re-sign, restart or another change); algorithm-policy changes and backup restore do not trigger a parent re-sign by themselves. Tests: `ParentDsFollowsChildKeyChangeTests` (10, real SQLite host; red first for create, remove, remove-last, unsign, serial, rename and retry; delete and grandchild are guards). Authoritative.Tests 670, Dnssec.Tests 129, Web.Tests 2081 (without Docker), rollover tests 11, new class stable over 5 runs. Build 0 warnings. Reviewed three times by the verifier. Closes #48 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #48

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Closes #48

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #48

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #48

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The DNSSEC guide says when a failed re-sign of a parent zone is retried
All checks were successful
Build / Pack and Push NuGet Packages (dhcp) (push) Successful in 1m28s
Build / Pack and Push NuGet Packages (dns-core) (push) Successful in 1m36s
Build / Build Binary (linux-amd64) (push) Successful in 36s
Build / Build Binary (macos-arm64) (push) Successful in -14s
Build / Build Binary (macos-amd64) (push) Successful in 5m18s
Build / Build Binary (windows-amd64) (push) Successful in 4m55s
Build / Build Binary (linux-arm64) (push) Successful in 16m3s
Build / Smoke Test the Windows Binary (push) Successful in 18s
Build / Build and Push Image (push) Successful in 15s
Build / Build Arch Linux Packages (push) Successful in 1m22s
Build / Build and Test Deb and RPM Packages (push) Successful in 4s
Build / Publish Release (push) Successful in -2m36s
Build / Pipeline (push) Successful in 0s
Build / Test .NET (pull_request) Successful in 34m5s
Build / Stage Draft Release (pull_request) Successful in -5s
Build / Pack and Push NuGet Packages (common) (pull_request) Successful in 30s
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Successful in -25s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Successful in -24s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in 2m48s
Build / Build Binary (macos-arm64) (pull_request) Successful in 2m24s
Build / Build Binary (linux-arm64) (pull_request) Successful in 2m55s
Build / Build Binary (linux-amd64) (pull_request) Successful in 8m4s
Build / Build Binary (macos-amd64) (pull_request) Successful in 7m16s
Build / Build Binary (windows-amd64) (pull_request) Successful in 7m14s
Build / Smoke Test the Windows Binary (pull_request) Successful in 17s
Build / Build and Push Image (pull_request) Successful in -2m26s
Build / Build Arch Linux Packages (pull_request) Successful in -1m50s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in 43s
Build / Publish Release (pull_request) Successful in 7s
Build / Pipeline (pull_request) Successful in 0s
9023137d4a
Refs #48

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit 11f127d7d1 into develop 2026-11-05 12:15:19 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!306
No description provided.