The OIDC bridge: build-vs-adopt ruling, claims/groups mapping, token lifetimes, where it runs #731

Closed
opened 2026-08-24 01:18:05 +00:00 by ben · 1 comment
Owner

Parent

Map: IDIP as a core identity alternative to kanidm (#725)

Question

With R1/R2 in hand, rule: adopt / wrap-a-library / write; whether the bridge is a control-plane component or its own core service; the OIDC issuer identity (id.<apex> as today?) and discovery; how a membership ACDC's attributes (role, joinedAt, community) map to OIDC claims and the group model the auth gate and catalogue apps consume (ADR 0150's operator-is-admin, committees as groups); session/token lifetimes vs ACDC revocation latency; PKCE (the gate enforces it, #643); what the bridge stores (nothing but KEL/ACDC cache?). Output: ADR.

## Parent Map: [IDIP as a core identity alternative to kanidm](https://git.matou.nz/Matou/idss/issues/725) (#725) ## Question With R1/R2 in hand, rule: adopt / wrap-a-library / write; whether the bridge is a control-plane component or its own core service; the OIDC issuer identity (`id.<apex>` as today?) and discovery; how a membership ACDC's attributes (role, joinedAt, community) map to OIDC claims and the group model the auth gate and catalogue apps consume (ADR 0150's operator-is-admin, committees as groups); session/token lifetimes vs ACDC revocation latency; PKCE (the gate enforces it, #643); what the bridge stores (nothing but KEL/ACDC cache?). Output: ADR.
ben self-assigned this 2026-08-24 13:36:00 +00:00
Author
Owner

Resolution (Ben, grilled 2026-08-24)

Landed as ADR 0196 (docs/adr/0196-idip-oidc-bridge-idss-idp.md, commit 372c4ef):

  1. Library + placement: wrap zitadel/oidc/v3 op (fosite fallback; never from scratch) as its own core service idss-idp — separate binary in this repo, own unit + declared health check (ADR 0112), Nix-provisioned like the kanidm block, at id.<apex> so every existing route/DDR and the gate-oidc client keep their door. Rejected: a component inside the control-plane binary (couples sign-in to the control plane's lifecycle; blurs 0004's seam).
  2. Claims/groups: sub = AID prefix; username/name/email from the membership ACDC; groups mirror kanidm 1:1 — membership ACDC = members, role attribute = operators, one ACDC per committee → committee:<slug> (independently revocable). Rejected: a single ACDC carrying a groups list.
  3. Lifetimes/storage: ID/access 1 h; refresh 30 d rotating with a TEL re-check on every refresh; session cookie 12 h; PKCE S256 for every client; the bridge persists only signing keys, code/refresh records (bbolt) and a key-state cache — no member records, the registry is truth.

Unblocks #732 (sign-in prototype) and #734 (kanidm-surface counterparts); #733 still waits on #737.

## Resolution (Ben, grilled 2026-08-24) Landed as **ADR 0196** (`docs/adr/0196-idip-oidc-bridge-idss-idp.md`, commit `372c4ef`): 1. **Library + placement:** wrap `zitadel/oidc/v3` `op` (fosite fallback; never from scratch) as its **own core service `idss-idp`** — separate binary in this repo, own unit + declared health check (ADR 0112), Nix-provisioned like the kanidm block, at **`id.<apex>`** so every existing route/DDR and the `gate-oidc` client keep their door. Rejected: a component inside the control-plane binary (couples sign-in to the control plane's lifecycle; blurs 0004's seam). 2. **Claims/groups:** `sub` = AID prefix; username/name/email from the membership ACDC; **groups mirror kanidm 1:1** — membership ACDC = `members`, `role` attribute = `operators`, one ACDC per committee → `committee:<slug>` (independently revocable). Rejected: a single ACDC carrying a groups list. 3. **Lifetimes/storage:** ID/access 1 h; refresh 30 d rotating with a **TEL re-check on every refresh**; session cookie 12 h; PKCE S256 for every client; the bridge persists only signing keys, code/refresh records (bbolt) and a key-state cache — **no member records**, the registry is truth. Unblocks #732 (sign-in prototype) and #734 (kanidm-surface counterparts); #733 still waits on #737.
ben closed this issue 2026-08-24 13:42:58 +00:00
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.

Reference
Matou/idss#731
No description provided.