member-docs-editing: ADR 0258 gate exemption misses richdocuments/settings — preset fetch 302s #1644
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#1644
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?
Not the known frontier
This drive's KNOWN frontier (own-VPS carrier / pairing never flips) did not fire.
pairis green (163 ms), andlegs.jsoncarries no skip entries at all —verdict.jsonreads"legs": {"total": 39, "green": 38, "red": 1, "skip": 0}. So no skip reason in this drive names this red as out of scope.firstRedLegismember-docs-editing, and it is the only red.The live box at 170.64.221.214 was reachable, but not via the access line given in the prompt — that bare
ssh root@...is refused (Permission denied (publickey)). It answers with the identity the drive harvested inartifacts/live-box.json:Everything below marked (live) was read from the box read-only; nothing was mutated.
The failure
operator-docs-editingpassed (125 s).member-docs-editingfailed at 119 s on the same service, same gateway, one leg later:The droplet journal shows the editor-side chain during that leg (
logs/droplet-journal.txt, lines 1515–1519, 1550, 1663–1664):Failed to get new childat 23:24:04 is the moment the browser rendered "Document loading failed";verdict.jsoncloses the drive at 23:24:17.status[Found]is an HTTP 302, and it is our gate issuing it — not Nextcloud. Reproduced live from the gateway itself:That
locationis verbatim the gate's unauth redirect (/etc/caddy/caddy_config:177). Collabora's preset fetcher does not follow it, so it reads a 302 body as the.xcuand the shared config install fails.The defect
(live)
/etc/caddy/caddy_config:150-156— the ADR 0258 source-bound exemption:The
pathlist covers onlyrichdocuments/wopi*. Collabora's server-side config/preset fetch is a different prefix —/apps/richdocuments/settings/systemconfig/<token>/xcu/*.xcu— so it falls through tohandle { forward_auth … }and is gated. It is exactly the same kind of caller the exemption was written for: the community's own editor, calling back from the gateway's own address, carrying a per-open token and no community session.The matcher is doing its job for the paths it names; the path list is incomplete. Probing both shapes live confirms the split:
/apps/richdocuments/settings/systemconfig/…/documentView.xcu→ 302 to/authz/signin(gated — the bug)/index.php/apps/richdocuments/settings/systemconfig/…/documentView.xcu→ 302 to/authz/signin(gated — both shapes)/index.php/apps/richdocuments/wopi/files/112_oc2alaeh3hx6→ 500, no redirect (exempted — reaches Nextcloud)Suspected layer
Product, in the front door. Not harness, not infra:
free -m(live) shows 6463 MB available, no swap pressure, no OOM kills anywhere in the journal;coolwsd.serviceisactive (running)with peak memory 304.7 M against a 7946 M box. Nine kit processes (kit_spare_001–004,subforkit_001+kit_spare_006–009) are alive (live), soNo child availableis not pool exhaustion — it is the failed config install leaving that configId with no usable kit.proof-memberthat succeeded — kanidm loggedIssuing Cookie session (privilege_capable) 0be48534-… for proof-member@id.roles-proof.idss.nzat 23:23:49, after the preset fetches had already failed at 23:23:24. The member reached the editor; the editor refused the document.What plugging it needs
Extend the
@files_callbackpath list to cover the editor's config/preset callbacks alongside the WOPI ones, keeping the sameremote_ipsource binding so the exemption stays source-bound per Ben's #1624 ruling (nothing about the trust boundary changes — same caller, same addresses, same token model):Both
/index.php-prefixed and bare shapes are needed — the journal shows coolwsd fetching the bare form while naming the configId with the/index.phpform.Two things to confirm while fixing, neither of which changes the defect above:
Integrator wopi call failed: FoundonPOST /browser/dist/fetch-settings-file, withCookie: idss_session=…decoding to{"sub":"proof-operator"}— but that is the settings-upload path and is non-fatal; its document still opened, andsubforkit_001spawned at ~23:21:16. The member's open 2 minutes later triggered a shared-config (re)install that failed and leftdocbroker_002with no kit. So the leg ordering, not the role, is what decides who eats the red — meaning this can present as flaky/role-specific. Widening the matcher removes the 302 for both./apps/richdocuments/settings/*from the gateway's own address does not return 302 would catch this at the door instead of atDocument loading failed.Worth a
docs/GOTCHAS.mdentry: a gate 302 on a server-side editor callback surfaces asstatus[Found]in coolwsd and, two legs later, asNo child available— look for the redirect, not the kit pool.drive
20260919T221805Zred atmember-docs-editing:docs-editing: proof-member's document /roles-proof-1789860104802.odt (file 112) was REFUSED by the editor — "Document loading failed — Keyboard navigation help Skip to app navigation Skip to mainevidence:
/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260919T221805Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedBlocked on an ADR 0258 ruling — asked, no reply in the window
Fix is implemented and green at the front-door render seam, but landing it needs a human ruling I cannot self-take.
The decision needed: ADR 0258 (Ben's #1624 ruling) explicitly reserves — "Opening the WOPI subtree to every address, or adding any other source-bound path, needs a ruling." This fix does exactly that: it extends
FilesEditorCallbackPathsfromrichdocuments/wopi*to also coverrichdocuments/settings/*(Collabora's server-side preset/.xcuconfig fetch), in both bare and/index.phpshapes.What I implemented (awaiting approval to land):
internal/clan/files.go— add/index.php/apps/richdocuments/settings/*and/apps/richdocuments/settings/*toFilesEditorCallbackPaths, keeping the sameremote_ipsource binding.internal/clan/frontdoor_test.go—TestRenderFrontDoor_CallbackPathsCoverTheEditorsSettingsPresetFetch(the door-level regression guard the ticket asked for: asserts the settings prefix rides the source-bound@files_callbackmatcher).docs/GOTCHAS.md#274 — a gate 302 on a server-side editor callback surfaces asstatus[Found]in coolwsd and two legs later asNo child available; look for the redirect, not the kit pool.Why this is very likely a two-way door (my recommendation: option 1, approve): nothing about the trust boundary changes — SAME caller (coolwsd, the community's own editor), SAME source binding (gateway's own addresses only,
remote_ipuntouched), SAME per-open token authorising it downstream in Nextcloud. The settings fetch was simply omitted from the original path list; it is the same class ADR 0258 already blessed. Fully revertible; the seam test proves it.The mechanism (for the record): the settings path 302s to
/authz/signin, coolwsd reads the redirect body as the.xcu, the shared-config install fails, and two legs laterdocbroker_002hasNo child availableand the member's document is REFUSED. The operator leg survived only by leg ordering (its earlier open spawned a kit before the member's open forced the failing reinstall) — so this presents as flaky/role-specific when it is neither.Ask: I posted this to Mattermost (thread
kfwz3yicujbppmmiew4udd1sao) and waited 20 min with no reply, so I am parking it rather than self-ruling a change the governing ADR reserved.Why human
Adding a source-bound gate-bypass path is a security-posture change that ADR 0258 explicitly reserved for a ruling ("adding any other source-bound path, needs a ruling"), and security-posture widening is on the ADR 0174 one-way-door list. To re-arm: reply approving option 1 (or name an alternative), then re-add
ready-for-agent.Duplicate of #1642 — same run-7 red, same cause, and the ruling it needs from Ben is asked there (options + recommendation). Closing this one so the decision has one home.