Repository navigation
feat(acme): add acme-dns (DNS-01) challenge support - #4
Merged
Merged
Conversation
- Add AcmeDns variant to ChallengeConfig supporting server_url, username, password, subdomain, and optional propagation_delay (alias acmedns). - Implement native update_acme_dns client over hyper and rustls to publish DNS TXT records to acme-dns without external dependencies. - Wire DNS-01 challenge completion in ACME scheduler. - Add negative configuration validation, client unit tests, mock acme-dns server, and full ACME issuance roundtrip tests.
- Publish every TXT value first, then wait propagation_delay once (capped at the order deadline) before marking challenges ready, so N domains no longer cost N waits. Cap propagation_delay at 300 s, inside the 600 s order timeout. - Reject more than 2 domains per source: acme-dns keeps only the 2 newest TXT values per subdomain. - Talk to acme-dns with the default web PKI roots instead of the ACME ca_cert roots. - Store the password as a redacted Secret. - Report only the HTTP status on failure, never the remote body. - Validate username/password as header values, restrict subdomain to [A-Za-z0-9-], reject query strings and build /update with url::Url. - Allow clippy::large_enum_variant on SourceConfig (CI uses -D warnings). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Reject propagation_delay over 300, query strings, control characters in the password, and dotted subdomains. - Reject more than 2 domains; check the password is redacted in Debug. - Check failures don't echo the server body; cover a trailing /update/. - Collapse a nested if in the mock acme-dns server (clippy). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
debiansid
force-pushed
the
feat/acme-dns
branch
from
November 17, 2026 13:33
890a0d4 to
6e2ae35
Compare
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
Adds
acme-dns(DNS-01 challenge) support toshoes, matchingsing-box's configuration schema (server_url,username,password,subdomain, and optionalpropagation_delay) and building natively onto existinghyper1.0 andrustlsinfrastructure without adding external dependencies.Key Changes
src/certificates/mod.rs,src/certificates/tests.rs):ChallengeConfig::AcmeDns(aliasacmedns).propagation_delay <= 3600.src/certificates/acme.rs):connect_stream.update_acme_dnsto perform authenticated HTTP/1.1 POST/updaterequests withX-Api-User,X-Api-Key, and JSON payload{"subdomain": "...", "txt": "..."}.ChallengeType::Dns01inprepare_challenges, posting the TXT challenge value viaauthorization.dns_value(), applyingpropagation_delay, and setting the challenge ready.src/certificates/acme_tests.rs,src/certificates/tests.rs):MockAcmeDnsserver.update_acme_dns(success, 401 unauthorized, 500 error, URL normalization).dns-01challenge verification.acme_dns_issuance_roundtrip.Verification
cargo check: 0 warnings, 0 errorscargo test --lib certificates::acme::tests::acme_dns: 2 passed, 0 failedcargo test --lib certificates::: 52 passed, 0 failed, 1 ignored (root-only test)git diff --check: clean