sso: Listmonk and Gramps Web send no PKCE and kanidm enforces it — newsletters and whakapapa sign-in will be refused; ruling needed on relaxing ADR 0196 for two clients #1601
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1601
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 is wrong
kanidm creates every OAuth2 client in enforced-PKCE mode. Two of the apps spec #1535 put on kanidm OIDC send no PKCE, and neither has a switch to turn it on:
20260918T183606Z)code_challenge_method/code_verifierstrings; v6 source builds the URL withcfg.AuthCodeURL(state, oidc.Nonce(nonce))and exchanges withcfg.Exchange(ctx, code)gramps_webapi/auth/oidc.py:394registers the provider withclient_kwargs = {"scope": ...}onlySo kanidm will refuse both at the authorize step, exactly as it refused Paperless in run 15:
No PKCE code challenge was provided with client in enforced PKCE mode->invalid_request, and the person sees kanidm's error page. Paperless had a switch (oauth_pkce_enabled, landede74b1cbb). These two do not. #1539 and #1541 proved the render's commands, never a sign-in (GOTCHAS #252). The door legs have not reached either app's kanidm hop yet (run 15 stopped earlier on harness faults, fixed ine74b1cbb); the next fire will show the refusal live.Why human
Security posture. ADR 0196: "PKCE S256 required for every client". Every way forward either relaxes that for two clients or takes on a maintenance burden.
Options
1. Disable PKCE enforcement on those two kanidm clients (recommended)
kanidm system oauth2 warning-insecure-client-disable-pkce <client>in the newsletters and whakapapa OIDC oneshots.state; Listmonk also anonce.2. Carry a patch for each app
Gramps Web: one line (
code_challenge_method: S256inclient_kwargs; authlib keeps the verifier in the session) - but it ships as an upstream container image, so a patch means building and hosting our own image. Listmonk: ~15 lines (store the verifier beside the state cookie, pass it at exchange) as a Nix package override. Keeps ADR 0196 whole; costs a fork of two upstream apps to maintain on every bump, and an upstream PR each.3. Take both apps off OIDC
Neither supports header-trust auth, so this means the
ownposture (the app's own login, no community role reaches inside) - which reverses the #1535 ruling for two of the seven services.Acceptance
operator-newsletters,member-newsletters,operator-whakapapaandmember-whakapapaare green.Confirmed live (run 15's healer, re-walking newsletters on the still-up box):
441911f0-7e60-44e3-86c7-6d1a542f4568 ERROR … No PKCE code challenge was provided with client in enforced PKCE mode | o2rs.name: "newsletters". Whakapapa had a second, mechanical fault in front of this one (the callback route, #1603, landed85aa9b92); past it, it meets the same wall. Run 16 is firing without this ruling so archive, surveys and document-archive can be proven meanwhile — expect*-newslettersand*-whakapapared on PKCE alone.Ruled by Ben, 2026-09-18, in session: option 1. Recorded as ADR 0254 (amending ADR 0196) and landed on main as
c0c8d550:internal/clan/pkceexception.goholds the two slugs and the one place the kanidm command is written; it panics for any other slug, and tests hold the list, the two call sites and both renders. The IDIP bridge is unchanged and not covered — a separate ruling before either app is offered on an IDIP community. Live proof is the #1547 door legsoperator|member-newslettersand-whakapapa. Closing.