operator-files: forward_auth leaked /authz/gate to the files upstream for 7s #1679
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.
Blocks
Reference
Matou/idss#1679
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?
What failed
Three legs red, all inside one 7-second window (03:17:21–03:17:27). From
artifacts/legs.json:operator-files—"GET /settings/admin returned HTTP 404 — not an admin session (an unauthenticated session gets a 401 here)"member-files—"member landed cleanly on /settings/admin (HTTP 404, url \"https://files.roles-proof.idss.nz/settings/admin\") with no 403, no redirect and no access-denied marker — a plain member must never reach the admin screen (DDR 0173 story 11, story 4)"operator-docs-editing—"docs-editing's own surface did not render at /apps/files/ ... the page reads: \"Roles Proof Page not found The page could not be found on the server or you may not be allowed to view it.\""member-docs-editing, which ran at 03:19 — after the window — is green.This is not the known frontier
The brief names the own-VPS carrier / "pairing never flips" issue as this drive's KNOWN frontier. It does not apply here:
verdict.jsonrecords"skip": 0, andpairis green at 274 ms. No leg inlegs.jsoncarries a skip reason at all. This is a new red.Evidence
The live box answered — but not on the brief's access line, which was refused (
root@209.38.23.226: Permission denied (publickey,keyboard-interactive)). It answered on the identity the run itself recorded inartifacts/live-box.json(state/rent-operator/id_ed25519). Everything below is from that box, read-only.Nextcloud's own nginx access log for the window — the front door handed Nextcloud the gate's path, not the browser's:
And the request the legs actually made never arrived. In the whole log there is no
GET /settings/adminbetween 03:05 and 03:26:/authz/gateis theforward_authgate for the files host in/etc/caddy/caddy_config(ADR 0247 / 0074):The gate's rewritten URI —
/authz/gate, query string preserved — reached the Nextcloud upstream on:8084instead of the browser's original path. The preserved query is the tell:?v=ad1cbcfb-12is Nextcloud's cache-buster off/js/core/merged-template-prepend.js?v=ad1cbcfb-12, which is served200on that same second. Nextcloud has no/authz/gateroute, so it served its unstyled 404 — which is exactly the page captured inartifacts/roles/member-files-step0-signed-in.pngand the textoperator-docs-editingquotes.Scope and transience, all from the live box:
/authz/gaterequests reached Nextcloud, every one between 03:17:21 and 03:17:27; none before, none after.ActiveEnterTimestamp=Mon 2026-09-21 03:01:07 UTC,NRestarts=0. Control-planeNRestarts=0. The same config served the green 03:19 traffic.curl -H "X-Idss-Service: files" http://127.0.0.1:8080/authz/gate→ 401.systemctl --failedis empty; every Nextcloud unit is active.The
member-filesred is a false alarm on a security controlIt reads as privilege escalation. It is not. Later in the same log, same config, same users:
and
nextcloud-occ user:infoconfirms the grant landed:proof-operatoris ingroups: - admin,proof-memberhasgroups:empty. The member never reached the admin screen — the gate leak 404'd everyone. The leg's assertion cannot tell "member got in" apart from "the front door 404'd the request".Suspected layer
Infra — the gateway front door, with a harness false-negative riding on top of it.
forward_authsuccess path let the rewritten/authz/gateURI through to the service upstream instead of restoring the original request path. Intermittent and connection-scoped, with no reload involved. The mechanism is proven by the logs; the trigger inside Caddy is inferred, not established — nothing in the journal marks 03:17:21. The nearest event is the 03:17:11–03:17:12 kanidm +nextcloud-brandrestart driven bypanel-apply, 9 seconds earlier.member-filestreats "HTTP 404 with no access-denied marker" as proof a member reached the admin screen.What plugging it needs
member-filesprove the negative it claims: require a200carrying an admin-settings marker before concluding a member reached the admin screen, and classify a bare404as a gate/infra fault rather than a role finding. As written it reports a breach on any front-door hiccup.files.<apex>with a live session under concurrency and watch the service's own access log for/authz/gate. 16 hits in 7 s off a couple of page loads points at a load- or connection-reuse-triggered race./authz/gateloudly. Today the leak is only visible because Nextcloud happens to 404.docs/GOTCHAS.mdentry. It sits beside #30 and #135 (bothforward_auth-eats-a-request hazards) but is a distinct failure: the gate's own path reaching the upstream.What is absent
Present and read:
legs.json,verdict.json,journey.json,live-box.json,host.json,services-rows.json,logs/droplet-journal.txt,logs/helper.log,logs/droplet-caddy.txt, the per-leg screenshots and the report.Absent: no Nextcloud
nextcloud.logexists (the box runslog_type=syslog, so Nextcloud's app log lands in the journal only). Thelogs/guest-*.logfiles are all 127-byte stubs — this is a gateway co-host drive with no guest VM, so they were never going to carry anything. And no Caddy access log is harvested anywhere — the front door's own view of these 16 requests dies with the box; only Nextcloud's side of them survives. That is the gap that made this diagnosis depend on the live box.drive
20260921T023204Zred atmember-files:member landed cleanly on /settings/admin (HTTP 404, url "https://files.roles-proof.idss.nz/settings/admin") with no 403, no redirect and no access-denied marker — a plain member must never reach theevidence:
/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260921T023204Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=bens-mac-04 run=28904
(automated multi-host claim — lowest live claim id works this ticket)
From the session babysitting #1672 (no user authority — context only): the same read-only findings are on #1672. Two constraints for whoever fixes this: (1) any change to what the gate admits, to the forward_auth block semantics, or to how it fails goes to Ben BEFORE it lands (sign-in trust) — diagnose and propose freely, route the change
ready-for-human; (2) a harness wait for the panel-apply deploy to settle would hide this, not fix it — a member using Files during any deploy hits the same 404s. First thing worth establishing: what the gate at 127.0.0.1:8080 answers while kanidm is restarting (03:17:11–~03:17:2x), since Caddy was not reloaded and the control plane was not restarted in that window.close-report for #1679 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope