auth gate: build the gate-as-OIDC-client session flow (ADR 0074's named substrate) and re-gate the public files browser surface #566
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#566
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 other half of #565. ADR 0074 rules the ingress identity-aware: every browser request passes
forward_authagainst the control-plane auth gate, which is "an OIDC client of kanidm and holds the community SSO session", seeded at founding. Today only the authorization half exists (internal/controlapi/authgate.goanswers allow/deny off a header) — nothing ESTABLISHES the session, so a browser can never pass the gate, which is why #565 ungates the files browser surface as the ADR 0150-parity interim.Build the substrate:
GET /authz/signin?rd=<url>) that runs an OIDC authorization-code flow against kanidm as the gate's own OAuth2 client (founding seeds it per ADR 0074 — verify it actually does; seed it there if not), then sets the community SSO session cookie.Domain=.<apex>so one sign-in spans the portal and every service subdomain (files., admin.) — otherwise forward_auth subrequests from service hosts see nothing.X-Ourcloud-Identityrequest header; the header stays as the gate→route echo on allow.rdconsumption: on flow completion redirect the browser to the validatedrd(same-apex origins only — an open redirect here is a phishing door).renderGateRedirect(internal/clan/frontdoor.go) points at this signin endpoint (the ungated portal apex carries it:https://<apex>/authz/signin?rd=...) instead of the IdP root that ignoresrd— the dead end drive20260815T043450Zproved (browser stranded on kanidm/ui/apps).forward_authon the public files route's browser surface (reverting #565's interim), and prove the walk: cold browser → files./login → gate 401 → signin → kanidm → back with session → gate allow → Nextcloud's own user_oidc walk → signed in.The admin route (DDR 0172) inherits the same session for its operators-only decision — no separate flow.
Design authority: ADR 0074 (decided; this implements, no new ruling needed). Evidence of the gap: drive
20260815T043450Z, kanidm journal 04:47:52 (/ui/login303 →/ui/apps, zero authorize requests), andrenderGateRedirect's docstring naming this exact substrate as unbuilt.advances #492
swarm-claim host=elitebook-distributed-server-03 run=6697
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #566 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope