founding: the _acme-challenge CNAME is never written — wildcard DNS-01 cannot complete on the subdomain path #324
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.
Depends on
Reference
Matou/idss#324
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?
The broker accepts an
acme_challengefield on/v1/subdomains/pointand writes the_acme-challenge.<slug>CNAME from it (broker/internal/broker/http.go:25-32,broker.go:206,zone.go:190-200). The field is documented as gateway-supplied.No Go caller ever populates it. The seam verb carries no such argument —
founding.BrokerClient.PointSubdomain(ctx, host, ip)(internal/founding/access.go:208) — and the client sends only{host, ip}(internal/brokerclient/client.go:95).The value it wants is already produced and published gateway-side, world-readable, at
/var/lib/ourcloud-acmedns/fulldomain(internal/clan/acmedns.go:60, republished every boot at:218-231). It has no reader.So on the
<slug>.idss.nzpath the delegation CNAME is never created, and Caddy's wildcard DNS-01 against the self-hosted acme-dns cannot complete.Related:
RenderAcmeDNShas no production caller at all (see the Attach-layer ticket), so this is currently latent rather than a live outage — but the two must land together.Definition of done
The acme-dns registration's fulldomain reaches
PointSubdomainand lands as the_acme-challenge.<slug>CNAME, with the ADR 0100 posture kept: an absent challenge writes A + wildcard alone, never a fabricated delegation.Found 2026-08-07 while scoping home-gateway reachability (dynamic address / automatic port opening / IPv6). Full trace in
docs/research/2026-08-07-home-gateway-reachability-scope.md.Verified: broker's
/v1/subdomains/pointconfirmed to accept and write anAcmeChallenge/acme_challengefield (http.go, broker.go, zone.go). Confirmedfounding.BrokerClient.PointSubdomain(ctx, host, ip)and the concretebrokerclient.Client.PointSubdomainboth carry only host+ip, no challenge value. Confirmed the acme-dns fulldomain file is published gateway-side with no reader anywhere in the repo. Claim holds.Agent Brief
Category: bug
Summary: Wire acme-dns's published fulldomain value through to the broker's PointSubdomain call so the
_acme-challengeCNAME actually gets written.Current behavior:
The broker already accepts and writes an
acme_challengefield via its point-subdomain endpoint, but no Go caller populates it — the seam between founding and the broker client carries only host+ip. The acme-dns fulldomain value that should fill it is already produced and published gateway-side (a world-readable file, republished every boot), but nothing reads it.Desired behavior:
The acme-dns registration's fulldomain value is read gateway-side and threaded through the point-subdomain call so the broker writes the
_acme-challenge.<slug>CNAME. When no challenge value is available/known, behavior stays exactly as today: A + wildcard alone, never a fabricated delegation.Key interfaces:
PointSubdomain(ctx, host, ip) errorneeds an optional challenge value threaded through (both the interface and the concrete HTTP client that implements it).Dependency note: this depends on #327 landing first (or alongside it). The module that produces the acme-dns fulldomain file has no production caller yet (#327), so acme-dns doesn't run in a real deployment until #327 wires it in — landing this ticket alone is inert without it. Filed as a blocking dependency on #327.
Acceptance criteria:
_acme-challenge.<slug>CNAME.Out of scope:
Landed in main as
9e7b361.founding.BrokerClient.PointSubdomainnow carries anacmeChallenge, threaded through the productionbrokerclient.Client(sent asacme_challenge, omitted when empty) andFakeBroker. A newfounding.ChallengeSourceport (WithChallengeSource) reads the gateway-published fulldomain, andwireNamethreads it through on the subdomain path. When present, the broker delegates the_acme-challenge.<slug>CNAME; when absent (no source wired, or the gateway's acme-dns not yet registered — a missing/empty fact is honest, not a fault) the name is wired with A + wildcard alone, never a fabricated delegation (ADR 0100/0118).Production reader
acmeChallengeReaderoverclan.AcmeDNSFulldomainFactis wired in both helper builds (newChallengeSourceOption); the boot seam test names the newchallenge-sourceport. Depended on #327's composition, which had landed.Evidence: seam tests both ways at the founding seam (
internal/founding/standup_test.go:TestStory20_AcmeChallengeThreadedWhenPublished,TestStory20_AcmeChallengeAbsentWritesNoDelegation) and the brokerclient seam (internal/brokerclient/client_test.go: present sendsacme_challenge, empty is omitted).go build/vet/testgreen undernix develop .#go-ci(incl. the pre-push full-suite run).Reopening on the 2026-08-08 whole-branch review's evidence:
9e7b361wiredPointSubdomain'sacmeChallengeend to end, but theChallengeSourcethe helper registers reads the gateway-published fulldomain with a plain LOCALos.ReadFileof/var/lib/acme-dns/fulldomainon the operator's host (app/helper/cmd/helper/acmechallenge.go). On any real topology that path exists only on the gateway, so the read is alwaysErrNotExist→ the honest-absent branch fires every time → A + wildcard are written with no_acme-challengedelegation, silently — the honest-absent design (ADR 0100/0118) is standing in for a missing transport.Remaining scope: a real transport for the fact (read it over the established clan/fleetwire channel the way other gateway facts travel — e.g. alongside
clan.AcmeDNSFulldomainFact's existing consumers), so absent means "the gateway hasn't registered yet", never "we looked on the wrong machine". Re-queued ready-for-agent.Fixed in
e297924(onorigin/main).The reopen was right:
9e7b361wiredPointSubdomain'sacmeChallengeend-to-end, but the productionChallengeSourceread the gateway-published fulldomain with a plainos.ReadFileon the operator's host — a path that exists only on the gateway — so the read was alwaysErrNotExist, the honest-absent branch fired every drive, and A + wildcard were written with no_acme-challengedelegation. ADR 0100/0118's honest-absent design was standing in for a missing transport.Real transport added. A new
fleetwire.ChallengeSource(internal/fleetwire/challenge.go) readsclan.AcmeDNSFulldomainFactover the guest-trust SSH connection — the same channelEnrolment.liveIDPreads the kanidm CA/idm_admin credential over (ssh … cat …). A not-yet-published fact (cat … 2>/dev/null || true→ empty, zero exit) or an unreachable gateway is honest-absent""; it never surfaces the transport error to founding, so a missing challenge decorates but never aborts the A + wildcard name-wiring. So absent now means only "the gateway's acme-dns has not registered yet", never "we looked on the wrong machine".wiring_prod.go:challenge-sourcenow wiresfleetwire.NewChallengeSourceovernewGuestVM().SSHPort+ the guest-trust identity +ExecRunner(the guest-facing adapter family's shape).wiring_dev.go: the dev/demo build (no real guest) wires the scripted honest-absentfoundingtestingsource.app/helper/cmd/helper/acme_challenge.gois deleted; the boot-seam comment (wiring_test.go) updated.Evidence: seam-tested three ways at the fleetwire seam (
internal/fleetwire/challenge_test.go): published → read & trimmed and read overssh root@127.0.0.1 cat <fact>; not-yet-registered → absent; unreachable gateway → absent, never fatal. Existing founding + brokerclient seam tests unchanged and green.go build/vet/testgreen undernix develop .#go-cion both build tags (pre-push full-suite gate passed).