IDIP bridge never reads its own sign-in session cookie — Nextcloud's OIDC hop re-prompts and the oidc-admin walk stalls blind for 120 s #1027
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.
Blocks
Reference
Matou/idss#1027
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?
Failure
Drive
20260830T094937Z, legoidc-admin, signature94a048d819e4(third consecutive red on this signature; the two prior heals —b28bf658,1dd3f5b5— each cleared a different fault in front of this one).artifacts/legs.jsonrecords 19 green legs thenoidc-adminred at 121250 ms withexpect(locator).toBeVisible() failed … Error: element(s) not found.artifacts/verdict.jsonnamesfirstRedLeg: oidc-adminat commit53d139cd.Evidence
The Playwright trace (
artifacts/journey.idip-IDIP-journey--133f0-ey-on-the-rehearsal-droplet/trace.zip, context1-trace.network/1-trace.trace) records the full walk. The founder's sign-in succeeded:That last line is the last request of the run. The trace's frame snapshots confirm it:
before@call@389(the click) is on…?authRequestID=b66f6a09…;after@call@391(the 120 s timeout) is on…?authRequestID=5bdc07d8….error-context.md's page snapshot at failure is a pristine bridge sign-in page —alertempty,paragraph(progress) empty, the form and "Nau mai ki E2E Drive" welcome line present.So: the member authenticated once at the bridge, and the bridge's second authorize — Nextcloud's own client — ignored the session it had just minted and re-rendered the sign-in page.
Suspected layer — the bridge (
internal/idp), not the journeyThe session cookie is write-only:
internal/idp/signin.go:19declaressessionCookieName = "idss_idp_session".internal/idp/signin.go:96callsl.setSession(w, identity.AID)on a successful verify;internal/idp/signin.go:142-152writes the 12 h cookie, its doc comment calling it "the browser-side session marker with the same lifetime".grep -rn 'sessionCookieName|idss_idp_session' --include=*.go .returns only those two sites plus one assertion ininternal/idp/keri_verifier_test.go:247. No handler reads it.internal/idp/signin.go:42-45—handlePagereads onlyauthRequestIDand unconditionally renders the page: no session lookup, no silent completion.internal/idp/storage.go:144-168—CreateAuthRequestrefusesprompt=noneand enforces PKCE, but carries no notion of an existing browser session; thesubjectit stores is whateverophands in (empty on a cold authorize).The design contract says this hop must be silent:
docs/ux/flows/files-member.mermaid:30— "returns with a live community session — the IdP hop is silent (SSO), the member lands straight back in Files".docs/adr/0196-idip-oidc-bridge-idss-idp.md:47— "Bridge sign-in session cookie 12 h".The journey encodes the same expectation:
app/tests/e2e/fixtures/idip.ts:314-336(oidcSignInViaBridge) signs in once and then waits for Nextcloud's#header.What plugging it needs
1. The substantive fix — honour the session on a subsequent authorize. On
GET /loginwith a valididss_idp_sessionwhose AID is still live in the verified-key cache (store.heldCredential,internal/idp/signin.go:183-194), complete the auth request and redirect to the callback instead of rendering the form. Three things a worker must settle while doing it:l.callbackisop.AuthCallbackURL(provider)(internal/idp/provider.go:94) and today onlyPOST /login/verifyis wrapped inl.interceptor.Handler(...)(internal/idp/signin.go:39). A silent completion fromhandlePageneeds the issuer in context too —GET /loginmust be wrapped the same way, or the callback URL will be built without an issuer.heldCredentialchecks only expiry — it never re-checks the TEL. ADR 0196:44-47 already bounds the exposure ("suspension = revocation + gate session kill … a missed kill is bounded to one access-token hour"), so reusing the held credential inside the 12 h window is consistent with the ruling; say so explicitly in the code comment rather than leaving it implicit.internal/idp/signin.go:59-63) is about skipping the ACDC presentation, not about re-prompting the member —keriVerify(internal/idp/signin.go:107-115) always runs the challenge and skips onlyPresentation. Silent SSO across clients is a separate axis and does not contradict it. Worth a line in the ADR so the next reader doesn't re-litigate it.2. The observability fix (secondary, but it cost this drive its whole 120 s ceiling).
oidcSignInViaBridge(app/tests/e2e/fixtures/idip.ts:326-327) now waits on three arms —#header, a non-empty[data-status], and the#1026protocol-error body text. A blank re-prompt matches none of them, so the leg can only time out withelement(s) not foundand say nothing about what it saw. Add a fourth arm:form#signinvisible again after the sign-in click means "the bridge asked a second time", and the leg should red in seconds naming that. This alone will not make the drive green — it only stops the next red from burning the ceiling blind.A targeted check for (1) lives in
internal/idp(GOWORK=$PWD/go.work go test ./internal/idp/): a seam test that verifies once, then issues a second authorize for a different client carrying the returned cookie, and asserts a 302 to the callback rather than a 200 sign-in page.drive
20260830T094937Zred atoidc-admin:expect(locator).toBeVisible() failed Locator: locator('#header').or(locator('[data-status]').filter({ hasText: /\S/ })).or(locator('body').filter({ hasText: /unable to retrieve client|invalid_request|evidence:
/home/dev/swarm/Matou/idss/test-results/drive-idip/20260830T094937Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=matou-dev-server-01 run=14456
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1027 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope