broker: desec-zone-binding — record CRUD on the deSEC-hosted zone; KeySystemsZone retires (ADR 0118) #234
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Founding spec #11 (ADRs 0047/0048/0049) · ADR 0118 (zone-with-API discharged: matou.nz DNS hosted at deSEC since 2026-07-31,
dad3345). Successor to #221's zone lever.What's true today
broker/internal/broker/(#221) is real behind theZoneport, but its only live binding isKeySystemsZone— the registrar dyndns endpoint that died with the zone migration (it only worked while iwantmyname's DNS served the zone). The port abstraction is exactly right; the binding under it is now a corpse.ourcloud-brokertoken (default-deny → allow matou.nz → explicit deny on every existing infra subname; fence-tested: 201/204 on community names, 403 on apex/MX/mail/acme/clan-lab, no domain-create, no token-manage). Secret arrives via matou-ops boot injection (never the repo).<slug>A,*.<slug>CNAME →<slug>.matou.nz,_acme-challenge.<slug>CNAME → the community's acme-dns registration.What to build
A
DesecZonebinding for the existingZoneport (record CRUD overhttps://desec.io/api/v1/domains/matou.nz/rrsets/), plus the port growing honest create/delete now that a binding can actually do it:%2A.Pointmust verify againstns1.desec.io/ns2.desec.org(fits ADR 0049's reachability gate) — never assume a 200 means resolvable.KeySystemsZoneretires;UnconfiguredZonestays the honest fail-loud default when no token is injected.Acceptance criteria
Pointreturns only after the records answer from deSEC's authoritative NSTask manifest
Landed in
18ebc92onorigin/main.What shipped:
KeySystemsZone(the dead registrar dyndns endpoint) retires; a realDesecZonedoes record CRUD over deSEC's bulk RRset REST API (PATCH …/domains/matou.nz/rrsets/) behind the policy-fencedourcloud-brokertoken (Authorization: Token).Zoneport grewPutRecords/DeleteRecords.Issuer.Pointwrites<slug>A +*.<slug>CNAME →<slug>.matou.nz+_acme-challenge.<slug>CNAME (the challenge CNAME only when a gateway acme-dns target is supplied — an empty target writes A + wildcard alone, never a fabricated delegation). NewIssuer.Offboard(POST /v1/subdomains/offboard) deletes the set and frees the slug; a failed delete keeps the reservation so a name is never freed while records linger.PutRecordsreturns only once the A record answers from deSEC's authoritative NS (ns1.desec.io/ns2.desec.org, queried directly), fitting ADR 0049's reachability gate.Retry-After, 5xx backs off (both retried to success, no fault surfaced); a hard 4xx is a terminal typedZoneRefusal, never a retry loop.UnconfiguredZonestays; boot wiring flipsMATOU_ZONE_PASSWORD→KeySystemsZonetoMATOU_DESEC_TOKEN→DesecZone.Acceptance evidence —
broker/internal/broker/zone_test.godrives the binding against a fake deSEC API: full-set-to-bulk-endpoint + publication-verified, 429-then-200 & 5xx-then-200 retry, hard-403 typed refusal not retried, delete-sends-empty-rrsets, unconfigured-fails-loud-before-any-call. Plusbroker_test.go/http_test.goissuer/API full-set + offboard tests. All broker Go stages (build/vet/test/lint) and the full repo gate pass.Out of scope (ADR 0118, unchanged): the gateway-side acme-dns registration flow, per-community deSEC tokens, the matou-ops secret injection itself.
git worktree repairkilled run 1649's sibling worker #239clan machines updateon a revision declaring ungenerated Nextcloud vars — ADR 0126's unsandboxed pre-generate never runs, so Files never stands up #1496deploy.targetHost#1497