feat(dns): govern unattended provider automation - #554
Merged
Conversation
Add a fail-closed policy boundary for background ACME DNS-01 writes, dedicated human permissions, and durable audit coverage.
📓 Changelog previewThis is what your commits will add to the generated ## [Unreleased]
### Added
- **dns:** Govern unattended provider automation
### Fixed
- **dns:** Close provider governance gaps
- **dns:** Redact Namecheap request values
- **dns:** Enforce provider governance boundaries
- **dns:** Harden automation authorization boundaries |
Require provider authority for manual DNS setup, bind automation to verified zones, validate mutation scope, and redact ACME values.
Keep ACME TXT and existing DNS record values out of provider debug logs.
Reject inactive providers before credential use, enforce automation permissions on resulting managed-domain state, and resolve active authoritative zones with an indexed query. Add direct HTTP, scheduler, and migration lifecycle regressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Security properties
Compatibility
Existing custom roles and API keys that relied on settings permissions must be explicitly granted the new DNS permissions. There is intentionally no implicit compatibility bridge because DNS provider access must remain fail-closed.
Evidence
Compile, formatting, and lint
Results: all exited 0 with no code warnings or errors. Cargo emitted only existing workspace/build notices.
Real PostgreSQL migration lifecycle and query plan
cargo test -p temps-migrations --test normalized_managed_domain_index_test -- --nocaptureResult with Docker access:
1 passed, 0 failedin 5.49s. The test directly executes the migration twice, verifies transaction-local lock and statement timeouts, checks the exact index definition and query plan, executesdown, and reappliesup.HTTP permissions, inactive-provider handling, ambiguity, and audits
Results with Docker access:
13 passed, 0 failedin 11.73s4 passed, 0 failedin 7.43sCoverage includes provider read/write/automation permission combinations, hostname sync authorization before database access, successful mutation audits, inactive-provider no-touch behavior, canonical duplicate conflict handling, ambiguous ownership failure, both setup-DNS permission guards, authoritative-zone wiring, and RFC 7807 responses.
DNS-01 scheduler and authorization ordering
cargo test -p temps-domains --lib dns01_ -- --nocaptureResult with Docker access and loopback ACME/DNS mocks:
4 passed, 0 failed, 1 ignoredin 10.73s. The relevant tests exercise the public renewal scheduler, provider discovery, missing/deny/error policy fallback before credential decryption, persisted pending orders, successful TXT cleanup/publication, propagation, finalization, reporting, and redacted audit outcomes. The ignored test is a pre-existing separately gated external integration case.Credential and audit redaction regressions
Results: Namecheap URL-secret redaction
1 passed; inactive masked-credential no-decryption1 passed; policy reason reflection2 passed.Independent review gates