front door: the apex gate swallows the wallet's own routes — the space-ID door (<api_url>/spaces) and the descriptor's join_url both answer a browser sign-in redirect, so the first-steward fallback cannot run on a real gateway #1645

Closed
opened 2026-09-20 01:12:59 +00:00 by ben · 1 comment
Owner

What the live gateway does (debug IDIP fire 10, 20260920T005201Z, d57c8289, founded community rehearsal-f.idss.nz)

The descriptor is now served as 1.1 from outside (#1638 proven live) and names:

  • api_url: https://<apex>/api/v1/idip
  • boot.join_url: https://<apex>/join

Probed from outside, with no browser session:

route answer
GET /api/client-config, GET /api/config 200 (the ADR 0226 d.4 carve-out)
GET <api_url>/spaces/challenge 302 → /authz/signin?rd=…
POST <api_url>/spaces 302 → /authz/signin
GET /join, /join/<x> 302 → /authz/signin
/idip/join/<x>, /haere-mai/<x> 200

Why it matters

  1. The space-ID door is unreachable by the wallet it was built for. Ben's ruling on matou-app #534 (ADR 0226 amendment, carried by #1608 / matou-app #534) says the first steward's wallet fetches a challenge from <api_url>/spaces/challenge and posts its presented operator Membership credential to <api_url>/spaces. The wallet is an app on a phone — it has no front-door cookie and cannot follow a browser sign-in. apexAllowList (internal/clan/frontdoor.go) does not carry the two paths, so ADR 0247's apex gate answers before the door's own verifier ever runs. The "later" scenario — the only one designed for — cannot complete on a real gateway. Same family as GOTCHAS #272 (a non-browser caller through the front door).
  2. boot.join_url points at a gated page. orgconfig.JoinURL renders <apex>/join; a person joining has no session by definition. The ungated join doors on the apex are /idip/join/* and /haere-mai/*.

The decision (Ben's — this widens what the apex serves without a community session)

Recommended: add exactly /api/v1/idip/spaces and /api/v1/idip/spaces/challenge to the apex allow-list. The door already authenticates every post itself (DoorVerifier + role: operator claim + roster check), remembers nothing, fails closed when the ledger is unreachable, and first write wins; the challenge read hands out a single-use two-minute nonce and nothing else. Nothing else under /api/v1/idip/* opens.

Alternative: serve the door on the sign-in host (id.<apex>, already ungated) and move api_url — a wire change for matou-app and the golden fixture.

For join_url: either the descriptor names an ungated app-first page, or /join joins the allow-list as a static page. Needs a look at what matou-app does with boot.join_url first.

Acceptance (once ruled)

  • From outside with no cookie: GET <api_url>/spaces/challenge answers the golden challenge shape; POST <api_url>/spaces with no proof answers the door's own 401, never a 302.
  • boot.join_url answers 200 from outside with no session.
  • Byte-pinned front-door render tests updated; every other /api/v1/idip/* route still redirects.
  • A GOTCHAS entry (the wallet is a non-browser caller).

Blocks the live pairing/sign-in proofs (#1522, #1531).

## What the live gateway does (debug IDIP fire 10, `20260920T005201Z`, `d57c8289`, founded community `rehearsal-f.idss.nz`) The descriptor is now served as **1.1** from outside (#1638 proven live) and names: - `api_url: https://<apex>/api/v1/idip` - `boot.join_url: https://<apex>/join` Probed from outside, with no browser session: | route | answer | |---|---| | `GET /api/client-config`, `GET /api/config` | 200 (the ADR 0226 d.4 carve-out) | | `GET <api_url>/spaces/challenge` | **302 → `/authz/signin?rd=…`** | | `POST <api_url>/spaces` | **302 → `/authz/signin`** | | `GET /join`, `/join/<x>` | **302 → `/authz/signin`** | | `/idip/join/<x>`, `/haere-mai/<x>` | 200 | ## Why it matters 1. **The space-ID door is unreachable by the wallet it was built for.** Ben's ruling on matou-app #534 (ADR 0226 amendment, carried by #1608 / matou-app #534) says the first steward's wallet fetches a challenge from `<api_url>/spaces/challenge` and posts its presented operator Membership credential to `<api_url>/spaces`. The wallet is an app on a phone — it has no front-door cookie and cannot follow a browser sign-in. `apexAllowList` (`internal/clan/frontdoor.go`) does not carry the two paths, so ADR 0247's apex gate answers before the door's own verifier ever runs. The "later" scenario — the only one designed for — cannot complete on a real gateway. Same family as GOTCHAS #272 (a non-browser caller through the front door). 2. **`boot.join_url` points at a gated page.** `orgconfig.JoinURL` renders `<apex>/join`; a person joining has no session by definition. The ungated join doors on the apex are `/idip/join/*` and `/haere-mai/*`. ## The decision (Ben's — this widens what the apex serves without a community session) **Recommended:** add exactly `/api/v1/idip/spaces` and `/api/v1/idip/spaces/challenge` to the apex allow-list. The door already authenticates every post itself (DoorVerifier + `role: operator` claim + roster check), remembers nothing, fails closed when the ledger is unreachable, and first write wins; the challenge read hands out a single-use two-minute nonce and nothing else. Nothing else under `/api/v1/idip/*` opens. Alternative: serve the door on the sign-in host (`id.<apex>`, already ungated) and move `api_url` — a wire change for matou-app and the golden fixture. For `join_url`: either the descriptor names an ungated app-first page, or `/join` joins the allow-list as a static page. Needs a look at what matou-app does with `boot.join_url` first. ## Acceptance (once ruled) - From outside with no cookie: `GET <api_url>/spaces/challenge` answers the golden challenge shape; `POST <api_url>/spaces` with no proof answers the door's own 401, never a 302. - `boot.join_url` answers 200 from outside with no session. - Byte-pinned front-door render tests updated; every other `/api/v1/idip/*` route still redirects. - A GOTCHAS entry (the wallet is a non-browser caller). Blocks the live pairing/sign-in proofs (#1522, #1531).
Author
Owner

Ruled by Ben 2026-09-20: go with the recommendation. Landed ce479c6a — apexAllowList opens EXACTLY /api/v1/idip/spaces and /api/v1/idip/spaces/challenge; a red-first render test pins that nothing else under /api/v1/idip/ opens and that the allow-list renders before the gate. The browser proof still works through the same route (on the IDIP path the control plane reads its own session cookie, not the identity header the allow-list strips). ADR 0226 ("The door is reachable without a front-door session") + ADR 0247 amended, GOTCHAS #281.

Render-proven, live-unproven — the next IDIP drive should probe both routes from outside with no session (expect the challenge shape, and the door's own 401 on an empty post).

The join_url half is split to #1649: matou-app parses the field and never reads it, and no bare /join page exists, so it blocks nothing.

**Ruled by Ben 2026-09-20: go with the recommendation.** Landed `ce479c6a` — `apexAllowList` opens EXACTLY `/api/v1/idip/spaces` and `/api/v1/idip/spaces/challenge`; a red-first render test pins that nothing else under `/api/v1/idip/` opens and that the allow-list renders before the gate. The browser proof still works through the same route (on the IDIP path the control plane reads its own session cookie, not the identity header the allow-list strips). ADR 0226 ("The door is reachable without a front-door session") + ADR 0247 amended, GOTCHAS #281. Render-proven, live-unproven — the next IDIP drive should probe both routes from outside with no session (expect the challenge shape, and the door's own 401 on an empty post). The `join_url` half is split to #1649: matou-app parses the field and never reads it, and no bare `/join` page exists, so it blocks nothing.
ben closed this issue 2026-09-20 04:05:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1645
No description provided.