operator-docs-editing: WOPI callback gated by front-door forward_auth; + video OIDC red #1625
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.
Dependencies
No dependencies set.
Reference
Matou/idss#1625
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?
Drive
20260919T042605Z—artifacts/verdict.json: 39 legs, 35 green, 4 red, 0 skip,firstRedLeg: operator-docs-editing, commit4ffd4810.This is NOT the known frontier
The brief names pairing as the known red. That is not what happened here:
legs.jsonrecords{"leg":"pair","status":"green","ms":254}and zero skipped legs — so there are no skip reasons naming the own-VPS carrier issue. Pairing flipped. These four reds are new ground, and they are two defects, each hit twice (once as operator, once as member).Access note
The access line in the brief was refused:
root@209.38.83.115: Permission denied (publickey,keyboard-interactive). The box is up — it wants the drive's own key. I used the identity the drive recorded inartifacts/live-box.json(state/rent-operator/id_ed25519), read-only, and mutated nothing.Defect 1 —
operator-docs-editing/member-docs-editing: the WOPI callback is gated by the front doorLeg record:
coolwsd on the live box (
journalctl -u coolwsd):Replaying that GET on the box names the HTML:
So it is Caddy's
forward_auth— not Nextcloud, and not the coolwsd allow-list:507ff9e4/ GOTCHAS #265 is genuinely fixed (coolwsd now serves the editor frame before failing). coolwsd is a server-side daemon carrying a per-open WOPIaccess_tokenand never a community session cookie, so the gate 302s it to/authz/signinand it parses the sign-in HTML as JSON.Verified defective line —
internal/clan/files.go:99-105, no richdocuments WOPI entry:Layer: product (IDSS render). Same shape as #790.
Plugging it needs a ruling between two real doors:
/index.php/apps/richdocuments/wopi*toFilesExemptPaths. Narrow and token-governed, but it opens a session-less subtree onfiles.<apex>.NextcloudLoopbackTarget(internal/clan/files.go:140=127.0.0.1:8084, which matches the nginx listener I saw inss -tlnp). That then requires widening Collabora's allow-list ininternal/clan/docsediting_attach.go, which today pinsfiles.<apex>alone.That is a trust-boundary choice, not a mechanical repair.
Defect 2 —
operator-video/member-video: kanidm refuses the plugin'sresponse_modeThe leg text ("showed its OWN login form … a second login form") describes the symptom. The box shows the cause.
PeerTube (
journalctl -u peertube):kanidm, same second,
client_id=video:The chain, confirmed inside the closure this drive shipped:
dist/main.js:232hard-codesresponse_mode: 'form_post'.GET …/code-cb?code=…).oauth4webapithen throwsform_post responses are expected to use the POST method, whichopenid-client6.8.8 wraps atbuild/index.js:138ase('invalid response encountered', …)— the exact string PeerTube logged.Corroborating: the token exchange succeeded (
POST /oauth2/token → 200), so client id, secret, redirect_uri and PKCE are all correct — this is not a credential or registration fault.c92ca62f's closure fix worked: the plugin is present asplugins/node_modules/peertube-plugin-auth-openid-connect -> /nix/store/l60ijw…-1.2.0, andsystemctl --failedis empty.internal/clan/video.gosetsscope,discover-url,client-id,client-secret, the property maps andauth-display-name— nothing governing response mode.Layer: product, at the IDSS/plugin seam.
Plugging it also needs a ruling on shape: patch
response_modetoqueryin the derivation IDSS already owns (ADR 0257 builds this plugin into the closure, so it is in reach), or carry a plugin setting / version bump. Note kanidm's warning says the query-remap tolerance "WILL BE REMOVED in a future release", so requesting form_post is wrong independent of which fix lands.Prior work already in the run directory
artifacts/healer-refusal.jsonreaches these same two diagnoses and refused both under its refusal rule 3 (trust-boundary / non-mechanical),confident: false. I verified its two source-line claims against the repo and both hold. Caveat: it cites a harness fix at commitdd782cc(anSSO_BUTTONSselector it says was masking defect 2); that commit is not in this repo's history — unpushed, or in another tree — so treat its "the video presentation is already fixed" claim as unconfirmed.What's absent
state/founding-state.json— missing;logs/founding-state.logrecordscat: … No such file or directory.logs/broker-journal.txt—-- No entries --.logs/guest-*.logis a 127-byte stub (no SSH hostfwd … the guest was never created). Expected, not a fault: this is a rented-droplet drive andartifacts/host.jsonrecords"qemu": "exit ENOENT".artifacts/legs.json,verdict.json,journey.json(rows+fault),logs/droplet-journal.txt(659 KB),logs/droplet-caddy.txt, and the playwright report.Confidence
Both defects are localised to a named line with live-box evidence, but neither fix shape is decidable without a human ruling — defect 1 is a front-door trust-boundary choice, defect 2 a choice between patching a vendored derivation and carrying a setting. Hence
confident: false, matching the healer's own refusal. A swarm agent can act immediately once either door is picked.drive
20260919T042605Zred atmember-docs-editing:docs-editing: proof-member's document /roles-proof-1789795966209.odt (file 101) 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/20260919T042605Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedSession-runner (bens-mac-04) attempt under ADR 0174. Both defects confirmed against the tree; both stop on a human. Relabelled
ready-for-session→ready-for-human.What I verified in the repo (no live box touched — SSH still wants the drive's own key)
internal/clan/files.go:99-105FilesExemptPathscarries/remote.php/dav*,/remote.php/webdav*,/public.php/dav*,/status.php,/ocs/v1.php/cloud/users*— and no richdocuments WOPI entry. So coolwsd's server-to-serverCheckFileInfocallback (which carries a per-open WOPIaccess_token, never a community session cookie) hitsfiles.<apex>and Caddy'sforward_auth302s it to/authz/signin; coolwsd parses the sign-in HTML as JSON and fails the open. This is the identical shape as #790 (the OCS-users exempt path was added for the exact "the gate 302s a token-bearing non-browser client and it reads back sign-in HTML" failure).507ff9e4/ GOTCHAS #265 (the coolwsd allow-listallow="true") is genuinely fixed and is a different layer — confirmed.internal/clan/video.gorenderVideoOIDCPUTs the plugin settings (scope,discover-url,client-id,client-secret, the property maps,auth-display-name) and sets nothing governingresponse_mode. The plugin is fetched from npm as four hash-pinned tarballs and built into the closure (renderVideoLet, ADR 0257) — it is not vendored in this tree, so IDSS today has no lever on theresponse_mode: 'form_post'the plugin hard-codes. Theresponse_modegrep hits ininternal/idp/*are the IdP-bridge side, unrelated. kanidm rejectsform_post, remaps toquery(warning it "WILL BE REMOVED in a future release"), the code arrives as a GET, and the bundledoauth4webapithrowsform_post responses are expected to use the POST method. Token exchange succeeding (POST /oauth2/token → 200) rules out credentials/registration — confirmed the fault is response-mode alone.artifacts/healer-refusal.jsoncited a harnessSSO_BUTTONSselector fix atdd782ccthat isn't in history. That fix has since landed on main asddc57138(different sha; "SSO_BUTTONS … the one OUR OWN deploy sets", sig eb7521dbc40d). So the roles walk can now press our community sign-in button — which only exposes defect 2 more directly; it does not fix it.Why human
Neither fix is a two-way door under ADR 0174 (§3 one-way list: security-posture widenings; provable only by non-routine spend). Each is a ruling ask; proposed defaults below.
Defect 1 — the WOPI callback (a front-door auth-loosening). Two real doors:
/index.php/apps/richdocuments/wopi*toFilesExemptPaths(files.go:99). It is the #790-shaped fix: a client-protocol path governed by the per-file WOPIaccess_token, not the browser session — the same class as the DAV / OCS-users paths already exempt. Narrow (the richdocuments WOPI subtree, not blanket/index.php/apps/*); a suspended member's disabled Nextcloud account can't mint a WOPI token, so suspension still bites. But it is a new session-less-reachable subtree on the publicfiles.<apex>door — an auth-requirement loosening, which ADR 0174 §3 reserves for Ben.NextcloudLoopbackTarget(127.0.0.1:8084,files.go:140) and widen Collabora's WOPI allow-list indocsediting.go/docsediting_attach.go(which today pinsfiles.<apex>alone) to admit the loopback host. Keepsfiles.<apex>fully gated but adds a network-layer loopback trust path and needs two coordinated changes + a new trust seam.I recommend Door 1 (smaller, precedented). Whichever you pick is render-proven only; live proof rides the next rented-services re-drive's
operator-docs-editing/member-docs-editinglegs (a document must open in the Collabora editor).Defect 2 — the plugin requests the wrong
response_mode.form_postis wrong independent of the fix (kanidm rejects it and will drop the query-remap tolerance).response_mode'form_post'→'query'in the closure-built plugin (asubstituteInPlace/sedphase in thevideoOIDCPluginrunCommand,renderVideoLet), pinned by a render test asserting the patch phase. A version bump is blocked (2.x needs PeerTube ≥ 8.3.0; we pin 8.1.x); a pluginresponse_modesetting is unconfirmed and the box shows 1.2.0 hard-codes it, so a patch is the only in-reach lever.I did not land this blindly: the plugin's
dist/main.jsisn't in this tree (fetched from npm), so a robust patch needs the plugin source, and the change is unprovable offline — its only proof is the same paid rented-droplet re-drive'soperator-video/member-videolegs. Landing an unverifiable patch against fetched third-party code would burn a paid live drive if the exact string/mechanism is off — the anti-pattern the #1614 arc records.Routing
Both fixes are authored-ready the moment the two doors are picked; each is render-proven then closed on the next rented-services re-drive (
rehearsal-183family — operator spend, the executor's queue-armed job, never a one-shot session's per my standing). No code landed this session (no clean orthogonal two-way sub-part exists — every candidate change presupposes one of the rulings above).Ruled by agent under ADR 0174 — veto anytime.
Ruled and landed. Ben ruled option 1 in session (2026-09-19): the WOPI callback bypasses the front-door gate, bound to the community's own editor. Landed
5f1dcfb1with ADR 0258 — a NEW class, source-bound callback paths: a Caddy matcher ofpath /index.php/apps/richdocuments/wopi* /apps/richdocuments/wopi*ANDremote_ip <loopback + the founding's public IP>, rendered only while docs-editing is placed, never folded into the openFilesExemptPaths; a missing sidecar yields loopback alone, no source list renders no bypass (GOTCHAS #272). The binding is in Caddy because Nextcloud behind it has notrusted_proxies.Defect 2 (video) is fixed and LIVE-PROVEN:
89420211(the plugin verifies ES256, GOTCHAS #267) +8a9e4b93(the role claim carries PeerTube's numeric role id, #270) — #1620 run 620260919T143405Zgreen 38/38, frames eyeballed (operator greeted "dear administrator!", member "dear user!").Render- and unit-proven; the docs-editing half is live-unproven until the next #1620 fire (all three services). Closing — a red there files fresh evidence.