spec: one community sign-in, every door — the operator role means admin everywhere: per-port sign-in + role posture, the roles reconciler, and the per-service tranches (#1509 part b, ruled by Ben 2026-09-16) #1535

Open
opened 2026-09-16 18:54:44 +00:00 by ben · 5 comments
Owner

Parent

Grows out of #1509 (one community sign-in, seven doors — parts (a)/(c) already ruled by the agent: (c) landed 997635c3, (a) split to #1532). This spec is part (b), the security-posture widening the agent correctly left to Ben as an ADR 0174 one-way door — ruled by Ben 2026-09-16: extend one sign-in to every catalogue port, and make the operator role mean admin everywhere. ADR 0074 (auth gate), ADR 0076 (komiti drive front-door access; per-app role mapping tiers), ADR 0150 (files consumes kanidm OIDC, operator is admin), DDR 0173 (the member lands in files by claim alone), ADR 0179 (komiti materialise as Nextcloud groups via runtime claim maps).

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.

Problem Statement

The gate already answers the door half uniformly: every gated request to any <svc>.<apex> is checked by GET /authz/gate (internal/controlapi/authgate.go) → member.Orchestrator.GateDecision (internal/member/komiti.go:576); a service with no matrix policy is open to all members; operators are never locked out. On allow the gate echoes the member's identity on X-Idss-Identity (the kanidm preferred_username — the ledger's person id, operator for the founding operator; the roster AID on the IDIP path) and Caddy's copy_headers carries it to the backend (frontdoor.go:540). So every backend already receives who is asking on every gated request.

What is NOT uniform is what each app does with that identity — the account half:

port app sign-in today operator → admin today member auto-provision
files Nextcloud real kanidm OIDC client (files.go:822-946) founding operator only, via kanidm files-admin → ocgroups: admin (ADR 0150) yes
data-collections Grist trusted header GRIST_FORWARD_AUTH_HEADER=X-Idss-Identity (datacollections.go:360) broken: install admin is the placeholder owner@data-collections.local — provisioning attaches Grist with no owner (portroute.go:70) yes, but landing as a stranger
chat Mattermost real OIDC client (chat.go) none — mmctl roles system-admin is run for the SERVICE identity only (chat.go:309) yes
code Forgejo real OIDC client (code.go:253, add-oauth --provider openidConnect) none — no --admin-group on the source yes
meetings Jitsi OIDC-native (meetings.go) n/a — no admin construct n/a
mail Roundcube over Stalwart/LDAP OIDC (mail.go) n/a — webmail has no admin; Stalwart's admin is a service identity yes (LDAP)
document-archive Paperless-ngx 2.20.15 own login none —
whakapapa Gramps Web own login none —
surveys LimeSurvey CE own login none —
newsletters Listmonk 6.1.0 own login none —
archive Omeka S 4.x own login none —
video PeerTube own login (root bootstrap, video.go) none —
docs-editing / static-sites / front-door — ride Nextcloud (WOPI) / member-orbit control API / the gate itself n/a n/a

And one gap that breaks Ben's second sentence even for Nextcloud: GrantOperator (internal/member/roles.go:80) flips the ledger role and mints the rescue key but never touches kanidm's operators / files-admin groups — only vmguest.go:1610's founding render puts the operator there. A member promoted from the Members tab is an operator to the gate (isOperator reads the ledger) and a plain member to every app.

Solution

Follow ADR 0076's own shape — port-declared, never a uniform fiction — but make the declaration real and drive it from the two events Ben named:

  1. Every port declares its sign-in and role posture (in its catalogue/port declaration): signin: oidc | header | own and what an operator / a member becomes inside the app (operator: nextcloud group admin, operator: forgejo admin, operator: grist org owner, member: default, or front door only). The honest per-service line ADR 0076 already promises ("P6-S7 says so honestly per service") reads from this.
  2. A roles reconciler — one verb, ReconcileRoles(personID), fanned out over every DEPLOYED port's declared mapping — called from three events: member add/approve (P6), operator grant/revoke (P6, roles.go), and service deploy (P4/S11, so a newly placed service picks up every existing operator). The kanidm half (operators + files-admin group membership) is the reconciler's first implementation and fixes the GrantOperator gap; the per-app halves ride each port's admin API exactly as the health checks already do (ADR 0062 part 2, the forgejo-admin shape).
  3. Per-service sign-in tranches, cheapest first, each on one of the two mechanisms already in the tree:
    • real OIDC (the files.go template): Paperless-ngx (OIDC since 2.5.0; PAPERLESS_SOCIAL_ACCOUNT_SYNC_GROUPS present in 2.20.15), Gramps Web (OIDC since 3.4.0; the richest role mapping — OIDC_GROUP_OWNER/_EDITOR/_MEMBER…), PeerTube (peertube-plugin-auth-openid-connect), and Listmonk (OIDC since 4.1.0 but DB-configured — seed it through PUT /api/settings from the reconciler, not env).
    • trusted header (the datacollections.go template): LimeSurvey (AuthWebServer, serverkey, auth_webserver_autocreate_user; no core OIDC in CE), with the #1167 strip.
    • Grist stays on the header (its own OIDC is gated behind a phone-home GRIST_ACTIVATION key — kept OUT of a sovereignty stack); the fix is the owner identity + org access.
    • Omeka S has NO OIDC module (SAML-only third party) — a ruling of its own, not a slice.
  4. Proof: the phase-9 journey (journey.rented-services.spec.ts) gains a leg that signs the operator into one non-Nextcloud service and asserts the admin surface; the Whakatōhea demo is repaired by hand for Grist once the fix lands (session).

Security invariant (every header-trusting port, #1167): a port that trusts X-Idss-Identity lands header_up -X-Idss-Identity on 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:684 is the strip, renderProxy(..., exempt=true)). A port that speaks real OIDC needs no strip but MUST keep its claim/scope maps on the pattern files.go:822-946 sets: audience idm_all_persons (every person signs in), the admin bit keyed to ONE kanidm group via a collision-proof claim.

User Stories

  1. As an operator, when I add a member (by hand or by approving a signup), they sign in once at the community door and every service the panel deployed opens with an account of their own, with no second login. AC: on a community with N deployed ports, a fresh member reaches each port's home page signed in as themselves; a port that cannot do this shows "front door only" on its service card, never a foreign login.
  2. As an operator, when I grant a member the operator role, they are admin inside every deployed service within one reconcile. AC: GrantOperator → kanidm operators + files-admin membership + every declared per-app admin mapping; RevokeOperator removes exactly those; the audit line names which apps changed.
  3. As an operator, when I deploy a new service, every existing operator is already its admin the first time they open it. AC: P4 deploy calls the reconciler for the new port after its health check passes.
  4. As the founding operator on the Whakatōhea demo, I open Data collections and I am its install admin, not owner@data-collections.local. AC: #1536 below.
  5. As a member, on a port that trusts the header, no public caller can become me by sending X-Idss-Identity on an exempt path. AC: the strip test in frontdoor_test.go covers the port's exempt block.

Out of scope

  • The audited admin-credential reveal (#1532) — it stays the fallback for signin: own ports (Omeka until ruled).
  • Komiti → per-app roles beyond operator/member (ADR 0076 Tier 2 constructs: team, org, group folder) — not in this spec.
  • Changing what the header carries (username → email): the header stays the person id; ports that want an email read it from the OIDC token or the reconciler hands it over.

Dependencies

Tickets (filed with this spec): the Grist fix first (#1536), then the reconciler foundation (#1537), then per-port tranches blocked on it, the Omeka ruling, and the drive leg.

Tickets: #1536 → #1537 → #1538 #1539 #1540 #1541 #1542 #1543 #1544; ruling #1545; proof #1546.

## Parent Grows out of **#1509** (one community sign-in, seven doors — parts (a)/(c) already ruled by the agent: (c) landed 997635c3, (a) split to #1532). This spec is **part (b)**, the security-posture widening the agent correctly left to Ben as an ADR 0174 one-way door — **ruled by Ben 2026-09-16: extend one sign-in to every catalogue port, and make the operator role mean admin everywhere.** ADR 0074 (auth gate), ADR 0076 (komiti drive front-door access; per-app role mapping tiers), ADR 0150 (files consumes kanidm OIDC, operator is admin), DDR 0173 (the member lands in files by claim alone), ADR 0179 (komiti materialise as Nextcloud groups via runtime claim maps). 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. ## Problem Statement The gate already answers the **door** half uniformly: every gated request to any `<svc>.<apex>` is checked by `GET /authz/gate` (`internal/controlapi/authgate.go`) → `member.Orchestrator.GateDecision` (`internal/member/komiti.go:576`); a service with no matrix policy is open to all members; operators are never locked out. On allow the gate echoes the member's identity on **`X-Idss-Identity`** (the kanidm `preferred_username` — the ledger's person id, `operator` for the founding operator; the roster AID on the IDIP path) and Caddy's `copy_headers` carries it to the backend (`frontdoor.go:540`). So every backend already receives *who is asking* on every gated request. What is NOT uniform is what each app does with that identity — the **account** half: | port | app | sign-in today | operator → admin today | member auto-provision | |---|---|---|---|---| | files | Nextcloud | real kanidm OIDC client (`files.go:822-946`) | founding operator only, via kanidm `files-admin` → `ocgroups: admin` (ADR 0150) | yes | | data-collections | Grist | trusted header `GRIST_FORWARD_AUTH_HEADER=X-Idss-Identity` (`datacollections.go:360`) | **broken**: install admin is the placeholder `owner@data-collections.local` — provisioning attaches Grist with no owner (`portroute.go:70`) | yes, but landing as a stranger | | chat | Mattermost | real OIDC client (`chat.go`) | none — `mmctl roles system-admin` is run for the SERVICE identity only (`chat.go:309`) | yes | | code | Forgejo | real OIDC client (`code.go:253`, `add-oauth --provider openidConnect`) | none — no `--admin-group` on the source | yes | | meetings | Jitsi | OIDC-native (`meetings.go`) | n/a — no admin construct | n/a | | mail | Roundcube over Stalwart/LDAP | OIDC (`mail.go`) | n/a — webmail has no admin; Stalwart's admin is a service identity | yes (LDAP) | | document-archive | Paperless-ngx 2.20.15 | **own login** | none | — | | whakapapa | Gramps Web | **own login** | none | — | | surveys | LimeSurvey CE | **own login** | none | — | | newsletters | Listmonk 6.1.0 | **own login** | none | — | | archive | Omeka S 4.x | **own login** | none | — | | video | PeerTube | **own login** (root bootstrap, `video.go`) | none | — | | docs-editing / static-sites / front-door | — | ride Nextcloud (WOPI) / member-orbit control API / the gate itself | n/a | n/a | And one gap that breaks Ben's second sentence even for Nextcloud: **`GrantOperator` (`internal/member/roles.go:80`) flips the ledger role and mints the rescue key but never touches kanidm's `operators` / `files-admin` groups** — only `vmguest.go:1610`'s founding render puts the operator there. A member promoted from the Members tab is an operator to the gate (`isOperator` reads the ledger) and a plain member to every app. ## Solution Follow ADR 0076's own shape — **port-declared, never a uniform fiction** — but make the declaration real and drive it from the two events Ben named: 1. **Every port declares its sign-in and role posture** (in its catalogue/port declaration): `signin: oidc | header | own` and what an operator / a member becomes inside the app (`operator: nextcloud group admin`, `operator: forgejo admin`, `operator: grist org owner`, `member: default`, or `front door only`). The honest per-service line ADR 0076 already promises ("P6-S7 says so honestly per service") reads from this. 2. **A roles reconciler** — one verb, `ReconcileRoles(personID)`, fanned out over every DEPLOYED port's declared mapping — called from **three events**: member add/approve (P6), operator grant/revoke (P6, `roles.go`), and service deploy (P4/S11, so a newly placed service picks up every existing operator). The kanidm half (`operators` + `files-admin` group membership) is the reconciler's first implementation and fixes the `GrantOperator` gap; the per-app halves ride each port's admin API exactly as the health checks already do (ADR 0062 part 2, the `forgejo-admin` shape). 3. **Per-service sign-in tranches**, cheapest first, each on one of the two mechanisms already in the tree: - **real OIDC (the `files.go` template):** Paperless-ngx (OIDC since 2.5.0; `PAPERLESS_SOCIAL_ACCOUNT_SYNC_GROUPS` present in 2.20.15), Gramps Web (OIDC since 3.4.0; the richest role mapping — `OIDC_GROUP_OWNER/_EDITOR/_MEMBER…`), PeerTube (`peertube-plugin-auth-openid-connect`), and Listmonk (OIDC since 4.1.0 but DB-configured — seed it through `PUT /api/settings` from the reconciler, not env). - **trusted header (the `datacollections.go` template):** LimeSurvey (`AuthWebServer`, `serverkey`, `auth_webserver_autocreate_user`; no core OIDC in CE), with the #1167 strip. - **Grist** stays on the header (its own OIDC is gated behind a phone-home `GRIST_ACTIVATION` key — kept OUT of a sovereignty stack); the fix is the owner identity + org access. - **Omeka S has NO OIDC module (SAML-only third party) — a ruling of its own**, not a slice. 4. **Proof:** the phase-9 journey (`journey.rented-services.spec.ts`) gains a leg that signs the operator into one non-Nextcloud service and asserts the admin surface; the Whakatōhea demo is repaired by hand for Grist once the fix lands (session). **Security invariant (every header-trusting port, #1167):** a port that trusts `X-Idss-Identity` lands `header_up -X-Idss-Identity` on 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:684` is the strip, `renderProxy(..., exempt=true)`). A port that speaks real OIDC needs no strip but MUST keep its claim/scope maps on the pattern `files.go:822-946` sets: audience `idm_all_persons` (every person signs in), the admin bit keyed to ONE kanidm group via a collision-proof claim. ## User Stories 1. As an operator, when I add a member (by hand or by approving a signup), they sign in once at the community door and every service the panel deployed opens with an account of their own, with no second login. **AC:** on a community with N deployed ports, a fresh member reaches each port's home page signed in as themselves; a port that cannot do this shows "front door only" on its service card, never a foreign login. 2. As an operator, when I grant a member the operator role, they are admin inside every deployed service within one reconcile. **AC:** `GrantOperator` → kanidm `operators` + `files-admin` membership + every declared per-app admin mapping; `RevokeOperator` removes exactly those; the audit line names which apps changed. 3. As an operator, when I deploy a new service, every existing operator is already its admin the first time they open it. **AC:** P4 deploy calls the reconciler for the new port after its health check passes. 4. As the founding operator on the Whakatōhea demo, I open Data collections and I am its install admin, not `owner@data-collections.local`. **AC:** #1536 below. 5. As a member, on a port that trusts the header, no public caller can become me by sending `X-Idss-Identity` on an exempt path. **AC:** the strip test in `frontdoor_test.go` covers the port's exempt block. ## Out of scope - The audited admin-credential reveal (#1532) — it stays the fallback for `signin: own` ports (Omeka until ruled). - Komiti → per-app roles beyond operator/member (ADR 0076 Tier 2 constructs: team, org, group folder) — not in this spec. - Changing what the header carries (username → email): the header stays the person id; ports that want an email read it from the OIDC token or the reconciler hands it over. ## Dependencies Tickets (filed with this spec): the Grist fix first (#1536), then the reconciler foundation (#1537), then per-port tranches blocked on it, the Omeka ruling, and the drive leg. Tickets: #1536 → #1537 → #1538 #1539 #1540 #1541 #1542 #1543 #1544; ruling #1545; proof #1546.
Author
Owner

Proof ticket added by Ben's ruling: #1547 — the service-catalogue drive adds a member and grants an operator THROUGH THE PANEL, deploys + redeploys every catalogue service, and signs in as both roles at every door (operator = admin, member = user). Blocked on every build ticket + the Omeka ruling; #1546 stays the early one-service leg.

Proof ticket added by Ben's ruling: #1547 — the service-catalogue drive adds a member and grants an operator THROUGH THE PANEL, deploys + redeploys every catalogue service, and signs in as both roles at every door (operator = admin, member = user). Blocked on every build ticket + the Omeka ruling; #1546 stays the early one-service leg.
Author
Owner

#1545 RULED by Ben: option 1 now + build the Omeka S header-auth module → #1548. #1547 now blocks on #1548 instead of the ruling.

#1545 RULED by Ben: option 1 now + build the Omeka S header-auth module → #1548. #1547 now blocks on #1548 instead of the ruling.
Author
Owner

Chain update 2026-09-16 ~20:00Z: #1537 LANDED (1b34e278 — posture declarations + the roles reconciler; GrantOperator now writes kanidm operators/files-admin). #1536 was CLOSED BY ACCIDENT (my STATUS commit 3b4b5169 said "fix #1536" in its message — a Forgejo close keyword) and is REOPENED, untouched, still priority/ready-for-agent. #1548 is agent-blocked on a missing PHP lane + missing module repo → human input (Ben). #1547 now waits on #1536 + #1538–#1544 only; Omeka rides the own posture on the first fire.

Chain update 2026-09-16 ~20:00Z: **#1537 LANDED** (1b34e278 — posture declarations + the roles reconciler; GrantOperator now writes kanidm `operators`/`files-admin`). **#1536 was CLOSED BY ACCIDENT** (my STATUS commit 3b4b5169 said "fix #1536" in its message — a Forgejo close keyword) and is REOPENED, untouched, still priority/ready-for-agent. **#1548 is agent-blocked** on a missing PHP lane + missing module repo → human input (Ben). #1547 now waits on #1536 + #1538–#1544 only; Omeka rides the `own` posture on the first fire.
Author
Owner

Three granted-operator gaps filed from reading the landed ports against the code (before the proof burns a droplet on them): #1551 Grist has NO member-orbit port (a later-granted operator stays an editor); #1552 LimeSurvey's reconcile is a no-op and its superadmin seed follows the founding seat; #1553 every OIDC port's "no account yet — applies at first sign-in" no-op never re-runs, so an operator granted before their first visit auto-provisions as a MEMBER (Listmonk/Mattermost now, Paperless/Gramps landing the same way). All three bug + priority + ready-for-agent; #1547 now blocks on them too. Landed meanwhile: #1536, #1540, #1541, #1542, #1543, #1544. Still open: #1538, #1539.

**Three granted-operator gaps filed from reading the landed ports against the code (before the proof burns a droplet on them):** #1551 Grist has NO member-orbit port (a later-granted operator stays an editor); #1552 LimeSurvey's reconcile is a no-op and its superadmin seed follows the founding seat; #1553 every OIDC port's "no account yet — applies at first sign-in" no-op never re-runs, so an operator granted before their first visit auto-provisions as a MEMBER (Listmonk/Mattermost now, Paperless/Gramps landing the same way). All three bug + priority + ready-for-agent; #1547 now blocks on them too. Landed meanwhile: #1536, #1540, #1541, #1542, #1543, #1544. Still open: #1538, #1539.
Author
Owner

#1551 + #1552 landed (732e7941, c3a272e7); #1539 landed (b4d0b51e — Gramps OWNER via the OIDC roles claim, no gap). One more gap off #1552's landing: #1554 — a grant never re-renders surveys (P4 attaches added services only) and the outstanding tail never clears. #1547 now blocks on #1538, #1553, #1554.

#1551 + #1552 landed (732e7941, c3a272e7); #1539 landed (b4d0b51e — Gramps OWNER via the OIDC roles claim, no gap). One more gap off #1552's landing: **#1554** — a grant never re-renders surveys (P4 attaches added services only) and the outstanding tail never clears. #1547 now blocks on #1538, #1553, #1554.
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.

Dependencies

No dependencies set.

Reference
Matou/idss#1535
No description provided.