feat(backends): namecheap CA + registrar - #1
Merged
Conversation
First concrete backends behind the rota-core trait surface, plus the
config-to-trait-object dispatch the scheduler will drive.
- NamecheapClient: shared XML-over-HTTPS client with query-string auth
(ApiUser / ApiKey / UserName / ClientIp); single instance reused
across the CA + registrar since both surfaces share the same creds.
- NamecheapCa: namecheap.ssl.reissue + namecheap.ssl.getInfo polling.
Surfaces TXT-style DCV (newer Sectigo flow) with CNAME-style as
a fallback.
- NamecheapRegistrar: namecheap.domains.dns.{getHosts,setHosts} with
the get-merge-set pattern setHosts requires (full-replacement API).
- xml: tolerant walker for the OK/ERROR envelope plus first_text /
first_attribute helpers — typed-deserializer-per-command would be
too brittle against Namecheap's inconsistent response shapes.
- Config: dedupe Namecheap creds into a top-level `namecheap` block.
CaSpec::Namecheap now carries only ssl_id; RegistrarSpec::Namecheap
is a marker. Account block is optional so non-Namecheap configs
parse cleanly.
- backends::build_from_config: hands the daemon a Vec<CertBackends>
with Arc<dyn CABackend> + Arc<dyn RegistrarBackend> per cert.
Install backends stub to None until the next PR (DSM + filesystem).
- Toolchain: bump pin to 1.88.0 ([email protected] + icu deps require it);
drop nightly-only rustfmt options that were emitting warnings on
every fmt run.
Tests: rota.example.yaml round-trips, name splitting handles apex /
nested subdomains, OK/ERROR envelopes parse, host-record element
extraction.
4 tasks
albedosehen
added a commit
that referenced
this pull request
May 7, 2026
First concrete backends behind the rota-core trait surface, plus the
config-to-trait-object dispatch the scheduler will drive.
- NamecheapClient: shared XML-over-HTTPS client with query-string auth
(ApiUser / ApiKey / UserName / ClientIp); single instance reused
across the CA + registrar since both surfaces share the same creds.
- NamecheapCa: namecheap.ssl.reissue + namecheap.ssl.getInfo polling.
Surfaces TXT-style DCV (newer Sectigo flow) with CNAME-style as
a fallback.
- NamecheapRegistrar: namecheap.domains.dns.{getHosts,setHosts} with
the get-merge-set pattern setHosts requires (full-replacement API).
- xml: tolerant walker for the OK/ERROR envelope plus first_text /
first_attribute helpers — typed-deserializer-per-command would be
too brittle against Namecheap's inconsistent response shapes.
- Config: dedupe Namecheap creds into a top-level `namecheap` block.
CaSpec::Namecheap now carries only ssl_id; RegistrarSpec::Namecheap
is a marker. Account block is optional so non-Namecheap configs
parse cleanly.
- backends::build_from_config: hands the daemon a Vec<CertBackends>
with Arc<dyn CABackend> + Arc<dyn RegistrarBackend> per cert.
Install backends stub to None until the next PR (DSM + filesystem).
- Toolchain: bump pin to 1.88.0 ([email protected] + icu deps require it);
drop nightly-only rustfmt options that were emitting warnings on
every fmt run.
Tests: rota.example.yaml round-trips, name splitting handles apex /
nested subdomains, OK/ERROR envelopes parse, host-record element
extraction.
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
First concrete backends behind the rota-core trait surface plus the config-to-trait-object dispatch the scheduler will drive next.
NamecheapCa—namecheap.ssl.reissue+namecheap.ssl.getInfopolling. Surfaces TXT-style DCV (newer Sectigo flow) with CNAME-style fallback.NamecheapRegistrar—namecheap.domains.dns.{getHosts,setHosts}with the get-merge-set patternsetHostsrequires (it's a full-replacement API; skipping the read step would wipe every other record on the domain).NamecheapClient— shared XML-over-HTTPS client with query-string auth. One instance perRotaConfig, reused across both surfaces since they share creds.xml— tolerant walker for the<ApiResponse Status="…">envelope plusfirst_text/first_attributehelpers. A typed-deserializer-per-command would be too brittle against Namecheap's inconsistent response shapes.Config schema
Account creds are now top-level rather than duplicated per cert:
backends::build_from_confighands the daemon aVec<CertBackends>where each entry holdsArc<dyn CABackend>+Arc<dyn RegistrarBackend>. Install backends stub toNoneuntil the next PR.Toolchain
Pinned to
1.88.0—[email protected]and the ICU stack (hyper/reqwesttransitive) require it. Dropped two nightly-onlyrustfmtoptions that were emitting warnings on every fmt run.Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscleancargo test --workspace— 8 passing (config round-trip, name splitting, OK/ERROR envelopes, host-record element extraction)DsmInstalllands and the scheduler loop is wired (next two PRs)What's not in this PR
DsmInstall+FilesystemInstall(next PR)