document-archive: one community sign-in via a kanidm OIDC client (the files.go template) — operators are superusers, members auto-provision on first sign-in #1538
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.
Blocks
Depends on
Reference
Matou/idss#1538
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?
Spec
#1535 — Ben's ruling (2026-09-16): adding a member in the control panel grants them access to every member service the control panel deployed; adding a member as an operator gives them admin access to all services. One community sign-in, every door, no second login, no hidden per-app credential.
Paperless-ngx 2.20.15 (our build,
django-allauth 65.16.1present) supports OIDC since 2.5.0.Build
oauth2 create paperless …, redirecthttps://document-archive.<apex>/accounts/oidc/kanidm/login/callback/, scope map audienceidm_all_personsopenid email profile groups, claim mappgroups(collision-proof, asocgroups) withoperators→admins— mirrorinternal/clan/files.go:822-946; the client secret is a clan var (sops-age).internal/clan/paperless.go):PAPERLESS_APPS=allauth.socialaccount.providers.openid_connect,PAPERLESS_SOCIALACCOUNT_PROVIDERSJSON (issuerhttps://id.<apex>/oauth2/openid/paperless),PAPERLESS_SOCIAL_AUTO_SIGNUP=true,PAPERLESS_SOCIAL_ACCOUNT_SYNC_GROUPS=true,PAPERLESS_DISABLE_REGULAR_LOGIN=trueONLY once the admin service identity (PaperlessAdminUser, the health check's) still works over API token — keep the local admin.is_superuser; the reconciler sets it viaPATCH /api/users/{id}/(is_superuser,is_staff) over the admin session the health check already drives (paperless.go).memberswith the permissions the port declares (view + add documents).Acceptance
files.goget || createshape).document-archive.<apex>with no second login and reaches/admin/as superuser.Security invariant (every header-trusting port, #1167): a port that trusts
X-Idss-Identitylandsheader_up -X-Idss-Identityon its client-protocol exempt paths in the SAME commit (the gated handle overwrites the header from the gate's answer; the exempt handle has no such vouch —internal/clan/frontdoor.go:684is the strip,renderProxy(..., exempt=true)). A port that speaks real OIDC needs no strip but MUST keep its claim/scope maps on the patternfiles.go:822-946sets: audienceidm_all_persons(every person signs in), the admin bit keyed to ONE kanidm group via a collision-proof claim.Also
Declare the port's posture and implement its
ReconcileRolefrom the reconciler ticket #1537; the P6-S7/P4-S5 card line reads from it.swarm-claim host=elitebook-distributed-server-03 run=25440
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime. Two render ambiguities in the Build section, both two-way doors (revertible by a later commit, render/seam-proved offline, exact wire proven on the deferred Phase-9 clan-lab drive — the whakapapa #1539 precedent):
OIDC client secret — the Build says both "mirror
files.go:822-946" (which reads kanidm's minted basic secret back withshow-basic-secret) and "the client secret is a clan var (sops-age)". These conflict: the kanidm CLI mints the basic secret and exposes no set-to-a-chosen-value verb, so a pre-generated clan-var secret cannot be pushed to the client. I followed the dominant instruction (mirror files.go): thedocument-archive-oidconeshot provisions thepaperlesskanidm client, reads the minted secret back, and writes the fullPAPERLESS_SOCIALACCOUNT_PROVIDERSJSON (client_id + secret + issuer) atomically into<store>/oidc.env, whichpaperless-webreads via a secondEnvironmentFileand ordersafterthe oneshot — the exact whakapapa #1539oidc.envshape. The secret never lands in a clan var or the world-readable Nix store.PAPERLESS_DISABLE_REGULAR_LOGIN— the Build gates it "ONLY once the admin service identity still works over API token", which cannot be verified offline. I left it unset (regular login stays enabled), mirroring whakapapa #1539's "OIDC_DISABLE_LOCAL_AUTH UNSET so the owner service identity still drives the health check" — the health check keeps the/api/token/path, the local admin is kept. The drive can flip it once it proves the token path survives.Proof: the render test pins the env + the kanidm oneshot + idempotency; the
documentarchivesvccontract test pins operator→superuser overPATCH /api/users/{id}/; the health check is untouched (still API-token). A later commit/drive reverts either call freely.close-report for #1538 — status
success⛔ close-report gates REFUSED this close — the following claims did not verify:
9f5524ef9eis not reachable from origin/main (not landed)envelope
close-report for #1538 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope