video sign-in: the closure-pinned plugin 1.2.0 hardcodes response_mode=form_post, which kanidm only tolerates by a remap it says WILL BE REMOVED — a future kanidm bump breaks video sign-in #1626
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#1626
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 hazard (not red today)
Seen on the #1620 roles-proof kept box (run 4,
20260919T042605Z) by the #1620 session: kanidm logs a warning that the video client's authorisation request carries an invalidresponse_mode=form_post, that it is remapping it toquery, and that this tolerance "WILL BE REMOVED in a future release".peertube-plugin-auth-openid-connect1.2.0 hardcodesform_post(dist/main.js:232). Since ADR 0257 (c92ca62f) that exact version is pinned into the closure (videoOIDCPluginVersion,internal/clan/video.go), and 2.x needs PeerTube >= 8.3.0 (the pin is 8.1.8) — so the plugin cannot simply be bumped today.What breaks, and when
Nothing now. On the kanidm release that drops the remap, every video community sign-in fails at the authorise step. It will arrive through a nixpkgs bump, silently, unless a drive with a video sign-in leg runs on that bump first (#1620's harness has one).
Options (for whoever picks this up)
form_post(check its source first) — version + four hashes, the ADR 0257 re-pin.runCommand(a one-linesubstituteInPlaceondist/main.js) — cheap now that the plugin is built in the closure; needs the callback route checked for query-mode handling.Source: cross-session note from the #1620 lane, 2026-09-19. Related: ADR 0257, #1616, #1544, spec #1535.
Ruled by agent under ADR 0174 — veto anytime.
Ruling:
ready-for-agent, take option 2 (patch the pinned 1.2.0 in the closure now)Category
bug(a latent product defect: a future kanidm bump silently breaks every video community's sign-in). Stateready-for-agent— this is a code change tointernal/clan/video.go, no design contract or host standing needed.Why option 2 and not 1 or 3:
substituteInPlaceondist/main.jsin the plugin'srunCommand,internal/clan/video.go:156) closes the hazard now, cheaply, while the plugin is already built in the closure (ADR 0257). Option 1 (re-pin to 2.x) is blocked on nixpkgs carrying PeerTube ≥ 8.3.0 — the hazard stays latent indefinitely. Option 3 (pin kanidm below the removal) freezes a security-relevant component to work around a plugin bug — the higher-regret path.response_mode=queryis the OAuth2 default for an authorization-code flow (the code returns in the query, single-use, exchanged over the back channel — not a token in the URL). Critically, kanidm already remaps this request toquerytoday, so the plugin's callback already receives and handles the query-mode response on every live sign-in — this patch makes explicit what already happens, so it is not a security-posture widening.Agent brief
Goal: stop the closure-pinned
peertube-plugin-auth-openid-connect1.2.0 from sendingresponse_mode=form_post, so video sign-in survives the kanidm release that drops theform_post→querytolerance.Where:
internal/clan/video.go. The plugin is built into the closure by apkgs.runCommandatvideo.go:156(videoOIDCPlugin, version const at:105). 1.2.0 hardcodesform_postatdist/main.js:232.Do:
runCommand, add asubstituteInPlace dist/main.js(or an equivalentsed/patchstep over the unpacked tarball) that changes the hardcodedresponse_mode=form_posttoquery(or removes theresponse_modeparam so PeerTube/the IdP default toquery). Readdist/main.js:232in the vendored tarball first to get the exact literal.query, so the current live callback receives the code in the query string. Confirm the plugin's redirect/callback route reads the code from the query (not only a POST body). If it does not, stop and report on the ticket rather than shipping a break.TestRenderVideo_*family (internal/clan/video_test.go) — assert the built plugin'smain.jsno longer containsform_post(or therunCommandcarries the substitution). Keep thesha512integrity/hash discipline intact (asubstituteInPlaceinsiderunCommandoperates on the already-fetched, hash-verified tarball, so the tarball hash at:129is unchanged).Definition of done:
go test ./internal/clangreen; the render test provesform_postis gone from the built plugin; the change is drive-proven by the next #1620 video sign-in leg (the authorise step no longer logs the kanidmform_postremap warning). Leave a note re-pointing at option 1 as the eventual replacement once nixpkgs carries PeerTube ≥ 8.3.0 and 2.x is confirmed to dropform_post.Related: ADR 0257, #1616, #1544, #1620, spec #1535.
swarm-claim host=bens-mac-04 run=27528
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1626 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope