Skip to content

feat(pki): DNSSEC online signing + KSK/ZSK rotation; promote PKI gates to experimental#121

Merged
aidankhogg merged 1 commit into
dev/alphafrom
claude/pki-dnssec
Jun 29, 2026
Merged

feat(pki): DNSSEC online signing + KSK/ZSK rotation; promote PKI gates to experimental#121
aidankhogg merged 1 commit into
dev/alphafrom
claude/pki-dnssec

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Summary

WS-A of the v1/production push: take PKI DNSSEC from "keys generated but inert" to end-to-end online signing, and move the PKI advanced-feature gates from unsupported (rejected) to experimental (load-with-warning).

DNSSEC end-to-end

  • PKIHandler.setup_dnssec gains a keys_host_dir so KSK/ZSK keys land in <zone_dir>/keys, which the already-running CoreDNS sees at /etc/coredns/keys — no container restart. Records generated_at for rotation aging.
  • DNSHandler._inject_dnssec_into_corefile (pure, idempotent) + enable_dnssec add a CoreDNS dnssec online-signing block to the zone stanza and reload CoreDNS.
  • Phase 3 generates keys into the CoreDNS keys dir and activates signing, recording dnssec_signing_active in pki_output.
  • PKICertRotationWorker rotates KSK/ZSK once past their configured lifetimes.

Gate promotion

pki.dnssec_enabled, crl_enabled, ocsp_enabled, and intermediate_ca_enabled move to experimental in feature_state.py + model metadata + the support matrix. They now load with a warning instead of being rejected. Promotion to stable is intentionally gated on a green CI e2e run — the dev environment has no Docker, so live signed-zone validation runs only in CI.

Testing

  • 15 new unit tests: Corefile DNSSEC injection (incl. idempotency/zone-isolation), enable_dnssec, keys_host_dir binding, and DNSSEC rotation aging.
  • New CI-gated e2e smoke test (@e2e @slow): generates keys, activates signing, and asserts CoreDNS serves DNSKEY records for the signed zone.
  • Updated loader/CLI tests for the unsupportedexperimental transition.
  • Full suite green locally; covered modules pass black/isort/flake8/mypy --strict.

⚠️ DNSSEC/CRL/OCSP correctness is validated by mock unit tests in dev; the real signed-zone validation rides the new e2e test in CI's Docker job. The gates stay experimental until that's green.

🤖 Generated with Claude Code


Generated by Claude Code

…s to experimental (WS-A)

Wire DNSSEC end-to-end instead of only generating keys:
- PKIHandler.setup_dnssec gains keys_host_dir so keys land in <zone_dir>/keys,
  visible to the running CoreDNS at /etc/coredns/keys, and records generated_at
  for rotation aging.
- DNSHandler.enable_dnssec + _inject_dnssec_into_corefile inject a CoreDNS
  `dnssec` online-signing block into the zone stanza and reload CoreDNS
  (idempotent, pure-function injection).
- Phase 3 generates keys into the CoreDNS keys dir and activates signing,
  recording dnssec_signing_active in pki_output.
- PKICertRotationWorker rotates KSK/ZSK once past their configured lifetimes.

Gate policy (per decision): promote pki.dnssec_enabled, crl_enabled,
ocsp_enabled (and intermediate_ca) from unsupported/reserved to EXPERIMENTAL in
feature_state.py + models metadata + support matrix, so they load with a warning
instead of being rejected. Promotion to stable is gated on a green CI e2e run
(no Docker available in this environment to validate live).

Tests: unit coverage for the Corefile injection, enable_dnssec, keys_host_dir,
and DNSSEC rotation aging; an e2e DNSKEY-serving smoke test (CI Docker, @slow);
updated loader/CLI tests for the unsupported→experimental transition.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NsdPH4dcsbTWeTFuTgswY
@aidankhogg aidankhogg merged commit 9818f0b into dev/alpha Jun 29, 2026
1 of 6 checks passed
@aidankhogg aidankhogg deleted the claude/pki-dnssec branch June 29, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants