docs-editing: Collabora's settings-file fetch is gated by the front door — once an operator opens the editor's admin page, EVERY document open fails (the #1620 run-7 red; needs a ruling under ADR 0258) #1642

Closed
opened 2026-09-19 23:28:11 +00:00 by ben · 1 comment
Owner

What happened (#1620 run 7, 20260919T221805Z, 38/39, commit 9acd1a4e)

operator-docs-editing went GREEN — the frame shows a genuinely loaded document in Collabora, so ADR 0258's source-bound WOPI callback works live (@files_callback rendered with remote_ip 127.0.0.1 ::1 <gateway public IP>).

member-docs-editing went RED: "Document loading failed". coolwsd's journal on the kept box:

ERR Failed to fetch preset uri[https://files.<apex>/apps/richdocuments/settings/systemconfig/<token>/xcu/documentView.xcu] with status[Found]
ERR Failed to install config [shared-https_files.<apex>/index.php/apps/richdocuments/wopi/settings-…]
WRN getNewChild: No child available. Sending spawn request to forkit and failing.
ERR Failed to get new child.

Cause

Collabora makes a SECOND server-to-server call to Files besides WOPI: it fetches each shared settings file from /apps/richdocuments/settings/{type}/{token}/{category}/{name} (richdocuments 9.2.2, SettingsController::getSettingsFile — @PublicPage, authorised by a per-open WOPI token of type TOKEN_TYPE_SETTING_AUTH, no community session). That path is not under /apps/richdocuments/wopi*, so the front door answers 302 to sign-in (replayed from the box: 302 -> /authz/signin). The config never installs, no document process is ever spawned for it, and the open fails.

It only bites once a settings file exists. The operator's admin check opened /settings/admin/richdocuments, whose Collabora settings frame uploaded the default documentView.xcu. The operator's document opened BEFORE that; the member's open came after. On a real community, the first time an operator visits that admin page, every document open for everyone breaks.

The decision (needs Ben — ADR 0258 says adding any source-bound path needs a ruling)

  1. Add /apps/richdocuments/settings/* (+ /index.php/…) to the source-bound callback list — same binding as ADR 0258: bypasses the gate only from the gateway's own addresses, only while docs-editing is placed. Note the glob also covers richdocuments' other settings/… routes (fonts, check, watermark) — from the gateway's own addresses only; Nextcloud still applies its own admin/session checks on those.
  2. Add only the narrow shape /apps/richdocuments/settings/systemconfig/* and /apps/richdocuments/settings/userconfig/* — just the token-bearing file fetch, nothing else.
  3. Leave it gated and accept that shared editor settings never install — not viable as-is: a gated preset fetch fails the whole document open, so this would need a way to stop Files advertising settings at all.

Recommendation: 2.

No change lands before the ruling. #1620 is blocked on this.

## What happened (#1620 run 7, `20260919T221805Z`, 38/39, commit `9acd1a4e`) `operator-docs-editing` went GREEN — the frame shows a genuinely loaded document in Collabora, so ADR 0258's source-bound WOPI callback works live (`@files_callback` rendered with `remote_ip 127.0.0.1 ::1 <gateway public IP>`). `member-docs-editing` went RED: "Document loading failed". coolwsd's journal on the kept box: ``` ERR Failed to fetch preset uri[https://files.<apex>/apps/richdocuments/settings/systemconfig/<token>/xcu/documentView.xcu] with status[Found] ERR Failed to install config [shared-https_files.<apex>/index.php/apps/richdocuments/wopi/settings-…] WRN getNewChild: No child available. Sending spawn request to forkit and failing. ERR Failed to get new child. ``` ## Cause Collabora makes a SECOND server-to-server call to Files besides WOPI: it fetches each shared settings file from `/apps/richdocuments/settings/{type}/{token}/{category}/{name}` (richdocuments 9.2.2, `SettingsController::getSettingsFile` — `@PublicPage`, authorised by a per-open WOPI token of type `TOKEN_TYPE_SETTING_AUTH`, no community session). That path is not under `/apps/richdocuments/wopi*`, so the front door answers 302 to sign-in (replayed from the box: `302 -> /authz/signin`). The config never installs, no document process is ever spawned for it, and the open fails. It only bites once a settings file exists. The operator's admin check opened `/settings/admin/richdocuments`, whose Collabora settings frame uploaded the default `documentView.xcu`. The operator's document opened BEFORE that; the member's open came after. **On a real community, the first time an operator visits that admin page, every document open for everyone breaks.** ## The decision (needs Ben — ADR 0258 says adding any source-bound path needs a ruling) 1. **Add `/apps/richdocuments/settings/*` (+ `/index.php/…`) to the source-bound callback list** — same binding as ADR 0258: bypasses the gate only from the gateway's own addresses, only while docs-editing is placed. Note the glob also covers richdocuments' other `settings/…` routes (fonts, check, watermark) — from the gateway's own addresses only; Nextcloud still applies its own admin/session checks on those. 2. **Add only the narrow shape** `/apps/richdocuments/settings/systemconfig/*` and `/apps/richdocuments/settings/userconfig/*` — just the token-bearing file fetch, nothing else. 3. **Leave it gated** and accept that shared editor settings never install — not viable as-is: a gated preset fetch fails the whole document open, so this would need a way to stop Files advertising settings at all. Recommendation: **2**. No change lands before the ruling. #1620 is blocked on this.
Author
Owner

Ben ruled option 2 (in session, 2026-09-20): only the two token-bearing settings-file shapes join the source-bound list. Landed as b02474e5 — ADR 0258 amendment, GOTCHAS #276, list test-pinned. Seam-proven; #1620 run 8 is the live proof.

Ben ruled **option 2** (in session, 2026-09-20): only the two token-bearing settings-file shapes join the source-bound list. Landed as `b02474e5` — ADR 0258 amendment, GOTCHAS #276, list test-pinned. Seam-proven; #1620 run 8 is the live proof.
ben closed this issue 2026-09-20 00:54:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1642
No description provided.