founding: an own-domain community can never enrol its public gateway — ownVPSApex hands the enrollment an empty apex, which assembleGatewayLiveSet refuses #2185

Closed
opened 2026-11-10 16:20:55 +00:00 by ben · 6 comments
Owner

What happened

TuIA founding (community 6c126096…, Access rented, Address own-domain tech.tuia.co), operator app 2026.11.3425 at f780f625, 2026-11-10 11:17 local. Seed and supply passed (#2183 is fixed); the stand-up then faulted at enroll-configure:

founding: stand up the rented server: clan: unknown on gateway: the enrollment step failed:
clan: a public gateway needs its apex — every ruled hostname derives under it (ADR 0113); none supplied

Why

internal/founding/ownvpspath.go ownVPSApex returns the draft's host only when Address.Kind == AddressSubdomain; an own-domain draft yields "". publicGatewayFacts (selfhostedpath.go) puts that into both CommunityApex and Public.Apex, and assembleGatewayLiveSet (clan/gateway_attach.go:204) refuses a public gateway whose Public.Apex is empty. So every own-domain founding on a public carrier (rented, own-VPS, self-hosted full-install) is a dead end at enrollment — the point stage happily shows the operator the four own-domain records (A, *. A, NS acme., A acme-dns., access.go gatewayDNSRecords) and verifies them, then the enrollment refuses the very apex those records were set for.

The empty apex dates from #383 (own-VPS carrier, subdomain-only); TestPublicGatewayFacts even pins "own-domain facts … want empty apex". The rest of founding already treats an own domain as the public apex: portalApex (handoff.go) returns Address.Host for subdomain OR own domain, communityApex (services.go) builds on it, deploy.go records it as the seat's apex, and probeSpec expects the gateway to run acme-dns for the delegated zone (ADR 0014). Only the enrollment facts were left behind.

Fix

ownVPSApex returns Address.Host for the own-domain kind too (an operator's own verified domain is not a fabricated apex — it is the name the point stage wired). Consequences, all intended by the existing design:

  • Public.Apex / CommunityApex = tech.tuia.co; the front door derives id., admin., mesh., the acme-dns zone under it.
  • publicCeremonyHost = id.<own domain> on an own-domain live box (same as the subdomain path; the kanidm cookie-origin fix #498/#660 now covers own domains too).
  • deploy.go's door probe adds the own-domain apex as the second door.

Tests: TestPublicGatewayFacts own-domain case flipped to expect the apex; TestOwnVPSApex added; TestPublicCeremonyHost gains an own-domain case (the old "own-domain" case had no Address at all — renamed "no address").

Not in this fix

  • DNS for the own-domain zone must be in place before enrollment (it is for TuIA: A, wildcard A, NS acme. → acme-dns., A acme-dns., all at 170.64.232.153). #2184 covers asking for them at the right time.
  • The seed stage still writes <slug>.idss.internal to idss/apex on every path (privatepath.go seedCommunityConfig is shared); deploy.go overwrites it with the public apex later, so it only matters between seed and deploy.
## What happened TuIA founding (community `6c126096…`, Access **rented**, Address **own-domain** `tech.tuia.co`), operator app 2026.11.3425 at f780f625, 2026-11-10 11:17 local. Seed and supply passed (#2183 is fixed); the stand-up then faulted at **enroll-configure**: ``` founding: stand up the rented server: clan: unknown on gateway: the enrollment step failed: clan: a public gateway needs its apex — every ruled hostname derives under it (ADR 0113); none supplied ``` ## Why `internal/founding/ownvpspath.go` `ownVPSApex` returns the draft's host **only when `Address.Kind == AddressSubdomain`**; an own-domain draft yields `""`. `publicGatewayFacts` (selfhostedpath.go) puts that into both `CommunityApex` and `Public.Apex`, and `assembleGatewayLiveSet` (clan/gateway_attach.go:204) refuses a public gateway whose `Public.Apex` is empty. So **every own-domain founding on a public carrier (rented, own-VPS, self-hosted full-install) is a dead end at enrollment** — the point stage happily shows the operator the four own-domain records (`A`, `*. A`, `NS acme.`, `A acme-dns.`, access.go `gatewayDNSRecords`) and verifies them, then the enrollment refuses the very apex those records were set for. The empty apex dates from #383 (own-VPS carrier, subdomain-only); `TestPublicGatewayFacts` even pins "own-domain facts … want empty apex". The rest of founding already treats an own domain as the public apex: `portalApex` (handoff.go) returns `Address.Host` for subdomain OR own domain, `communityApex` (services.go) builds on it, deploy.go records it as the seat's apex, and `probeSpec` expects the gateway to run acme-dns for the delegated zone (ADR 0014). Only the enrollment facts were left behind. ## Fix `ownVPSApex` returns `Address.Host` for the own-domain kind too (an operator's own verified domain is not a fabricated apex — it is the name the point stage wired). Consequences, all intended by the existing design: - `Public.Apex` / `CommunityApex` = `tech.tuia.co`; the front door derives `id.`, `admin.`, `mesh.`, the acme-dns zone under it. - `publicCeremonyHost` = `id.<own domain>` on an own-domain live box (same as the subdomain path; the kanidm cookie-origin fix #498/#660 now covers own domains too). - deploy.go's door probe adds the own-domain apex as the second door. Tests: `TestPublicGatewayFacts` own-domain case flipped to expect the apex; `TestOwnVPSApex` added; `TestPublicCeremonyHost` gains an own-domain case (the old "own-domain" case had no Address at all — renamed "no address"). ## Not in this fix - DNS for the own-domain zone must be in place before enrollment (it is for TuIA: A, wildcard A, `NS acme.` → `acme-dns.`, A `acme-dns.`, all at 170.64.232.153). #2184 covers asking for them at the right time. - The seed stage still writes `<slug>.idss.internal` to `idss/apex` on every path (privatepath.go `seedCommunityConfig` is shared); deploy.go overwrites it with the public apex later, so it only matters between seed and deploy.
ben self-assigned this 2026-11-10 16:20:55 +00:00

This was generated by AI during triage.

Triage ruling

Category: bug — every own-domain founding on a public carrier (rented, own-VPS, self-hosted full-install) dead-ends at enroll-configure. State: ready-for-agent.

Ruled by agent under ADR 0174 — veto anytime.

  • Ruling: this lands ready-for-agent (push), not ready-for-human. The one judgement call is whether making an own-domain public gateway enrol is a security-posture widening (a one-way door). It is not: the public-gateway surface already exists for the subdomain path, and the own-domain path is already designed as public everywhere downstream — portalApex (handoff.go) returns Address.Host for own-domain, communityApex (services.go) builds on it, deploy.go records it as the seat apex, probeSpec expects acme-dns for the delegated zone (ADR 0014), and the kanidm cookie-origin fix (#498/#660) already covers own domains. Only the enrollment facts (ownVPSApex) were left behind at #383. Completing an intended design is not loosening auth or opening a new deliberately-public surface.
  • Why a two-way door: revertible by a single commit to ownVPSApex, and provable by unit tests (below) with no live infrastructure. Not on the one-way-door list (no personal creds, no auth loosening, no member-facing trust accept, no data destruction, no spend, no hardware).
  • What proves it: the three tests named in the Fix section below, run with go test ./internal/founding/... ./internal/clan/....

Verification (confirmed against HEAD f780f625)

Reproduced the full fault chain in the code as reported:

  • internal/founding/ownvpspath.go:851 — ownVPSApex returns d.Address.Host only when Kind == AddressSubdomain, else "".
  • internal/founding/selfhostedpath.go:130,165 — publicGatewayFacts feeds that into both CommunityApex and Public.Apex.
  • internal/clan/gateway_attach.go:204 — assembleGatewayLiveSet refuses a public gateway with an empty Public.Apex, raising the exact error quoted in the report (a public gateway needs its apex … (ADR 0113); none supplied).
  • internal/founding/selfhostedpath_internal_test.go:45 — TestPublicGatewayFacts currently pins the own-domain case to want empty apex; this must flip.

(The report cited clan/gateway_attach.go:204; the file is at internal/clan/gateway_attach.go:204 — same line, same error string.)

Agent brief

Goal: an own-domain draft yields its own verified host as the public apex, so own-domain foundings on a public carrier reach and pass enroll-configure.

Change: in internal/founding/ownvpspath.go, ownVPSApex returns d.Address.Host for the own-domain kind too (an operator's own verified domain is the name the point stage already wired, not a fabricated apex). Consequences, all intended by existing design:

  • Public.Apex / CommunityApex = the own domain (e.g. tech.tuia.co); the front door derives id., admin., mesh., and the acme-dns zone under it.
  • publicCeremonyHost = id.<own domain> on an own-domain live box (same as the subdomain path).
  • deploy.go's door probe adds the own-domain apex as the second door.

Acceptance criteria (tests):

  • TestPublicGatewayFacts own-domain case flipped from want empty apex to expect the apex (selfhostedpath_internal_test.go).
  • TestOwnVPSApex added, covering subdomain → host, own-domain → host, and no-address/nil → empty.
  • TestPublicCeremonyHost gains an own-domain case (the old own-domain case had no Address at all — rename it no address).
  • go test ./internal/founding/... ./internal/clan/... green.

Out of scope (do NOT bundle):

  • DNS provisioning for the own-domain zone before enrollment — tracked by #2184.
  • The seed stage writing <slug>.idss.internal to idss/apex (shared seedCommunityConfig, overwritten by deploy.go later; matters only between seed and deploy).

Landing: push to main (no landing-pr — ordinary maintainer-filed bug, no app-report origin). Update STATUS.md in the same commit if this changes a gate/phase state.

> *This was generated by AI during triage.* ## Triage ruling **Category:** `bug` — every own-domain founding on a public carrier (rented, own-VPS, self-hosted full-install) dead-ends at enroll-configure. **State:** `ready-for-agent`. **Ruled by agent under ADR 0174 — veto anytime.** - **Ruling:** this lands `ready-for-agent` (push), not `ready-for-human`. The one judgement call is whether making an own-domain public gateway enrol is a *security-posture widening* (a one-way door). It is not: the public-gateway surface already exists for the subdomain path, and the own-domain path is *already designed* as public everywhere downstream — `portalApex` (handoff.go) returns `Address.Host` for own-domain, `communityApex` (services.go) builds on it, `deploy.go` records it as the seat apex, `probeSpec` expects acme-dns for the delegated zone (ADR 0014), and the kanidm cookie-origin fix (#498/#660) already covers own domains. Only the *enrollment facts* (`ownVPSApex`) were left behind at #383. Completing an intended design is not loosening auth or opening a new deliberately-public surface. - **Why a two-way door:** revertible by a single commit to `ownVPSApex`, and provable by unit tests (below) with no live infrastructure. Not on the one-way-door list (no personal creds, no auth loosening, no member-facing trust accept, no data destruction, no spend, no hardware). - **What proves it:** the three tests named in the Fix section below, run with `go test ./internal/founding/... ./internal/clan/...`. ## Verification (confirmed against HEAD f780f625) Reproduced the full fault chain in the code as reported: - `internal/founding/ownvpspath.go:851` — `ownVPSApex` returns `d.Address.Host` only when `Kind == AddressSubdomain`, else `""`. - `internal/founding/selfhostedpath.go:130,165` — `publicGatewayFacts` feeds that into both `CommunityApex` and `Public.Apex`. - `internal/clan/gateway_attach.go:204` — `assembleGatewayLiveSet` refuses a public gateway with an empty `Public.Apex`, raising the exact error quoted in the report (`a public gateway needs its apex … (ADR 0113); none supplied`). - `internal/founding/selfhostedpath_internal_test.go:45` — `TestPublicGatewayFacts` currently pins the own-domain case to `want empty apex`; this must flip. (The report cited `clan/gateway_attach.go:204`; the file is at `internal/clan/gateway_attach.go:204` — same line, same error string.) ## Agent brief **Goal:** an own-domain draft yields its own verified host as the public apex, so own-domain foundings on a public carrier reach and pass enroll-configure. **Change:** in `internal/founding/ownvpspath.go`, `ownVPSApex` returns `d.Address.Host` for the own-domain kind too (an operator's own verified domain is the name the point stage already wired, not a fabricated apex). Consequences, all intended by existing design: - `Public.Apex` / `CommunityApex` = the own domain (e.g. `tech.tuia.co`); the front door derives `id.`, `admin.`, `mesh.`, and the acme-dns zone under it. - `publicCeremonyHost` = `id.<own domain>` on an own-domain live box (same as the subdomain path). - `deploy.go`'s door probe adds the own-domain apex as the second door. **Acceptance criteria (tests):** - `TestPublicGatewayFacts` own-domain case flipped from `want empty apex` to expect the apex (`selfhostedpath_internal_test.go`). - `TestOwnVPSApex` added, covering subdomain → host, own-domain → host, and no-address/nil → empty. - `TestPublicCeremonyHost` gains an own-domain case (the old `own-domain` case had no `Address` at all — rename it `no address`). - `go test ./internal/founding/... ./internal/clan/...` green. **Out of scope (do NOT bundle):** - DNS provisioning for the own-domain zone before enrollment — tracked by #2184. - The seed stage writing `<slug>.idss.internal` to `idss/apex` (shared `seedCommunityConfig`, overwritten by `deploy.go` later; matters only between seed and deploy). **Landing:** push to main (no `landing-pr` — ordinary maintainer-filed bug, no app-report origin). Update `STATUS.md` in the same commit if this changes a gate/phase state.
Author
Owner

Fix landed on main as a5025990 (GOTCHAS #413, STATUS line). ownVPSApex returns the Address host for AddressOwnDomain too; TestPublicGatewayFacts, TestPublicCeremonyHost and TestSelfHosted_OwnDomainComposesWithoutClaimSecret flipped/extended; go test ./internal/founding/ ./internal/clan/ and go build ./... green.

Helper-side, so the walk continues once the testing feed names a5025990 and a matching operator app is installed (same hand-build recipe as #2183). Will report the next stage reached on tu-ia here.

Fix landed on main as a5025990 (GOTCHAS #413, STATUS line). `ownVPSApex` returns the Address host for `AddressOwnDomain` too; `TestPublicGatewayFacts`, `TestPublicCeremonyHost` and `TestSelfHosted_OwnDomainComposesWithoutClaimSecret` flipped/extended; `go test ./internal/founding/ ./internal/clan/` and `go build ./...` green. Helper-side, so the walk continues once the `testing` feed names a5025990 and a matching operator app is installed (same hand-build recipe as #2183). Will report the next stage reached on tu-ia here.

swarm-claim host=elitebook-distributed-server-03 run=63150
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=63150 (automated multi-host claim — lowest live claim id works this ticket)

⏩ independent reviewer for #2185 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #2185 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #2185 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261110-162847-940771 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 2185,
  "status": "success",
  "commits": [
    "adb41149b7419d67f8fd612d53df6fa8c98502ab"
  ],
  "changed_files": [
    "internal/founding/ownvpspath_internal_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/... ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/founding/... -run 'TestOwnVPSApex|TestPublicCeremonyHost|TestPublicGatewayFacts' -v",
      "exit_code": 0
    },
    {
      "command": "bash /tmp/go-gate-2185/run.sh  (full go-ci equivalent: gofmt + build + vet + test + golangci-lint, main module + broker + dev-tag) -> GO-GATE OK",
      "exit_code": 0
    }
  ],
  "criteria": {
    "TestPublicGatewayFacts own-domain case flipped from want-empty-apex to expect the apex": "landed on main as a5025990 (internal/founding/selfhostedpath_internal_test.go:46 AddressOwnDomain case); passes in the green run above",
    "TestOwnVPSApex added, covering subdomain -> host, own-domain -> host, and no-address/nil -> empty": "added in this commit adb41149 — internal/founding/ownvpspath_internal_test.go; the four subtests (broker subdomain, own domain, no address, nil draft) PASS in the -v run",
    "TestPublicCeremonyHost gains an own-domain case": "landed on main as a5025990 (internal/founding/ownvpspath_internal_test.go:67 'rented with an own-domain name -> id.<own domain> (#2185)'); passes in the green run",
    "go test ./internal/founding/... ./internal/clan/... green": "exit 0 — see tests[0]"
  },
  "summary": "Added the dedicated TestOwnVPSApex named by #2185's acceptance brief; the ownVPSApex own-domain fix itself already landed on main as a5025990.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #2185 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261110-162847-940771` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2185, "status": "success", "commits": [ "adb41149b7419d67f8fd612d53df6fa8c98502ab" ], "changed_files": [ "internal/founding/ownvpspath_internal_test.go" ], "tests": [ { "command": "go test ./internal/founding/... ./internal/clan/...", "exit_code": 0 }, { "command": "go test ./internal/founding/... -run 'TestOwnVPSApex|TestPublicCeremonyHost|TestPublicGatewayFacts' -v", "exit_code": 0 }, { "command": "bash /tmp/go-gate-2185/run.sh (full go-ci equivalent: gofmt + build + vet + test + golangci-lint, main module + broker + dev-tag) -> GO-GATE OK", "exit_code": 0 } ], "criteria": { "TestPublicGatewayFacts own-domain case flipped from want-empty-apex to expect the apex": "landed on main as a5025990 (internal/founding/selfhostedpath_internal_test.go:46 AddressOwnDomain case); passes in the green run above", "TestOwnVPSApex added, covering subdomain -> host, own-domain -> host, and no-address/nil -> empty": "added in this commit adb41149 — internal/founding/ownvpspath_internal_test.go; the four subtests (broker subdomain, own domain, no address, nil draft) PASS in the -v run", "TestPublicCeremonyHost gains an own-domain case": "landed on main as a5025990 (internal/founding/ownvpspath_internal_test.go:67 'rented with an own-domain name -> id.<own domain> (#2185)'); passes in the green run", "go test ./internal/founding/... ./internal/clan/... green": "exit 0 — see tests[0]" }, "summary": "Added the dedicated TestOwnVPSApex named by #2185's acceptance brief; the ownVPSApex own-domain fix itself already landed on main as a5025990.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Author
Owner

Verified on tu-ia: app 2026.11.3426 (a5025990) enrolled the own-domain gateway (tech.tuia.co) — eval preflight passed 12:02, system built 12:10, activated and paired 12:42, deploy complete 13:32 with every door (tech., admin., id., files., docs-editing., calendar.) over valid certificates. Closing; the two walls after it are #2186 (challenge CNAME) and #2187.

Verified on tu-ia: app 2026.11.3426 (a5025990) enrolled the own-domain gateway (`tech.tuia.co`) — eval preflight passed 12:02, system built 12:10, activated and paired 12:42, deploy complete 13:32 with every door (`tech.`, `admin.`, `id.`, `files.`, `docs-editing.`, `calendar.`) over valid certificates. Closing; the two walls after it are #2186 (challenge CNAME) and #2187.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#2185
No description provided.