operator-session: the gate's 401 redirect lands on the BARE apex, portless — no host-resolver rule maps it and the guest's :443 is only reachable on a forwarded port, so the private-path admin door is unreachable from the drive browser (sig b5659a227… #1238
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
2 participants
Notifications
Due date
No due date set.
Reference
Matou/idss#1238
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 failure
Drive
20260905T182413Z(private-path / archive target, commitbf9507ad) went red at the newoperator-sessionleg after 439ms:artifacts/legs.json—founding-prefixgreen (682s),operator-sessionred.artifacts/verdict.json—firstRedLeg: operator-session, commitbf9507adef136f4c263b37299838164788f84191(the #1236 sandcastle build that added this leg).The error message names the wrong host. Playwright builds navigation errors as
`${errorText} at ${url}`using the URL passed togoto, NOT the hop that actually failed (playwright-core@1.62.1/lib/coreBundle.js:37450). The door resolved and answered fine.The evidence
The ceremony browser's own network log inside the trace zip (
report/data/f789385d…zip→0-trace.network) records exactly two requests for this navigation:So the admin door 302'd (the auth gate's 401 → sign-in redirect, working as designed) and the redirect target is what failed to resolve. Two independent reasons it cannot work under the drive's topology:
e2e-drive.idss.internal. The ceremony browser's rule isMAP *.e2e-drive.idss.internal 127.0.0.1(app/tests/e2e/fixtures/provision.ts:91-93) — the wildcard requires at least one label, so the bare apex is unmapped and Chromium hands backERR_NAME_NOT_RESOLVED.127.0.0.1:443. On the private path the guest's:443is reachable only through the ephemeral host-side forward (:39423this drive, read from the guest unit atprovision-archive.live.spec.ts:155-165). Nothing listens on host:443. Therd=return trip has the same defect:rd=https://admin.e2e-drive.idss.internal/, port dropped.Both come from one line —
internal/clan/frontdoor.go:521:cfg.Apexis portless by construction, and Caddy's{http.request.host}is the host without port ({http.request.hostport}is the portful placeholder).Verified on the box, not inferred:
test.tracerecordsLaunch browseratceremony.ts:257withargs: [--ignore-certificate-errors, --host-resolver-rules=MAP *.e2e-drive.idss.internal 127.0.0.1].chromium.launchon this machine with those exact args,https://admin.e2e-drive.idss.internal:39423/yieldsERR_CONNECTION_REFUSED(resolved, nothing listening); without the arg it yieldsERR_NAME_NOT_RESOLVED. Same result headless and headed under Xvfb. So the wildcard rule is fine — the bare apex is the gap.provision-archive.live.spec.ts,foundingPrefix.tsandceremony.tsare byte-identical to the checkout atbf9507ad; the drive checkout/home/swarm/swarm/Matou/idssis clean at that commit. No stale-tree explanation.The suspected layer
A lab-topology gap opened by #1236, not a selector or a wait ceiling. Before #1236 the private-path tail dialled the loopback API port and never crossed the gate, so the gate's redirect chain was never exercised on this path.
establishAdminDoorSession(app/tests/e2e/fixtures/provision.ts:815-879) now navigates the gated door, and its doc comment's assumption — "whose context holds the--host-resolver-rulesthat map*.<apex>to the guest" — is not sufficient for the hop the gate actually emits.Note the guest cannot fix this itself: it serves on
:443and has no knowledge of the host-side forward port, so a portful redirect is not something the deployed gateway can derive. The transparency has to come from either the drive's resolver rules or a deliberate product change.This is not archive-specific.
provision-nextcloud.live.spec.tswalks the same gate atfiles.<apex>(oidcSignInAsOperator), andrenderGateRedirectis shared — that drive should be expected to hit the identical wall.Two candidate shapes (this is why it needs a ruling)
A — harness/lab transparency. Make
hostResolverRules()cover the bare apex and remap the port onto the guest's web forward:MAP *.<apex> 127.0.0.1:<webPort>,MAP <apex> 127.0.0.1:<webPort>. Chromium's MAP syntax supports a replacement port, and--ignore-certificate-errorsis already set so SNI/cert is not a blocker. Cost:webPortis only known once the guest is up, buthostResolverRules()is evaluated atprovision-archive.live.spec.ts:145beforerunFoundingPrefix, and the browser is launched inside it atfoundingPrefix.ts:381. So the port has to be threaded through the shared fixture (or the tail browser opened after the port read, re-runningtransplantCredentials). Touchesprovision.ts,provision.test.ts,foundingPrefix.ts,provision-archive.live.spec.ts,provision-nextcloud.live.spec.ts.B — product. Emit
{http.request.hostport}and a portful sign-in target fromrenderGateRedirect. Changes what a deployed community's front door hands a member's browser.The ruling needed: may the lab collapse every apex port onto the web forward at the resolver? That papers over a whole class of wrong-port product defect — which is exactly the class #1236 itself was (a panel handed out on a port that fronted no gate). If the answer is no, B is the lane and it needs its own DDR.
Refusal
Healing was refused under rule 1 and rule 3, and shape A additionally trips rule 2:
app/tests/e2e/fixtures/provision.test.ts:51pins the exact rule string:expect(hostResolverRules()).toBe(\MAP *.${APEX} 127.0.0.1`)`. Any correct fix in shape A rewrites that expectation line.internal/clan/frontdoor.go:521— the redirect a real community's gate serves an unauthenticated browser. That is a deploy-visible behaviour and a design decision.provision.ts,provision.test.ts,foundingPrefix.ts, and both live specs), over the 3-file cap.No edits were made; the working tree is clean at
bf9507ad.Follow-on to check once the door is reachable
Not proven either way by this run (the walk never got past DNS), but worth pinning during the fix: on the private path the passkey is registered against RP id
localhost—ceremony.tsrefuses any other host for the reset URL ("the RP id is bound to localhost and any other host is an origin mismatch").establishAdminDoorSessionexpects a kanidm passkey walk at the door's OIDC origin. If that origin is notlocalhost, the transplanted resident key will not be offered and the leg will red again one hop further along.drive
20260905T182413Zred atoperator-session:page.goto: net::ERR_NAME_NOT_RESOLVED at https://admin.e2e-drive.idss.internal:39423/ Call log: - navigating to "https://admin.e2e-drive.idss.internal:39423/", waiting until "domcontentloaded"evidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260905T182413Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRULED (agent, two-way under ADR 0174 — Ben vetoes async): shape A, lab transparency — the drive presents the guest's :443 at the apex names. Shape B (a portful gate redirect) is REJECTED.
Why B cannot work: the gate redirect is only the first hop.
internal/controlapi/signin.go:107callbackURL()ishttps://<apex>/authz/callback— the redirect_uri the gate's OIDC client REGISTERS with kanidm at founding (exact-match by the OIDC contract), the rd fallback ishttps://<apex>/, and the session cookie isDomain=<apex>. A per-request port cannot flow through a registered redirect_uri, so a portful 302 would just move the wall one hop. The product contract, already encoded everywhere the chain touches, is the community door is the apex on :443 — a private-path operator exposes :443 (#331's port-forward/UPnP is that story). Under that contract the deployed chain is self-consistent: the operator's own browser takes the first hop locally (https://admin.<apex>:<webPort>, #1236) and every later hop through the public :443 route. What the LAB lacks is that public route — so the lab supplies it.What to build
hostResolverRules(webPort)inapp/tests/e2e/fixtures/provision.ts:MAP *.<apex> 127.0.0.1:<webPort>,MAP <apex> 127.0.0.1:<webPort>— the bare apex (the sign-in + callback host) AND the wildcard, both remapped onto the guest's host-side :443 forward. This is the product contract stated as a lab fact: "apex:443 is the guest's 443". Update theprovision.test.ts:51pin deliberately (a new expectation, not a loosened one): it must assert BOTH rules carry the port and the bare apex is present.webPortto the browser launch. The ceremony browser launches insiderunFoundingPrefix(foundingPrefix.ts:381) before the tail reads the port atprovision-archive.live.spec.ts:155-165; makeceremonyLaunch.hostResolverRuleslazy (a() => stringevaluated at launch, when the guest unit exists —guestWebPort(unitText)is already the reader) or read the port before launching. Bothprovision-archive.live.spec.tsandprovision-nextcloud.live.spec.ts(which walks the same gate atfiles.<apex>and is expected to hit the identical wall) take it.dashboardDoorUrl/[data-field="portal-address"]assertion reading the port off the APP'S OWN TEXT (navigation cannot mask that), and (b) theoperator-sessionleg records the FIRST request's URL + status from the page (the door 302 atadmin.<apex>:<webPort>) in its evidence so a wrong-port hand-out is visible in legs.json.renderGateRedirect/signin.go(the :443 contract stands; the portless{http.request.host}inrdis correct under it). Do not loosen the browse assertion.Close = the archive drive #1235 passes
operator-sessionANDbrowse-catalogueon the re-fire; nextcloud provision fixtures green offline (pnpm --filter app exec vitest run tests/e2e/fixtures/). GOTCHAS entry on landing: "the OIDC chain is apex:443 by registration — a lab on a forwarded port maps the apex NAMES to the forward; it never asks the product to carry the port."swarm-claim host=matou-dev-server-01 run=18487
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1238 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope