IDIP as a core identity alternative to kanidm #725

Closed
opened 2026-08-24 01:17:52 +00:00 by ben · 2 comments
Owner

Destination

An IDSS community can be founded on IDIP (the Indigenous Digital Identity Protocol — KERI/ACDC, as implemented in matou-app with KERIA + signify-ts) instead of kanidm: the founder opts in at founding; the gateway stack runs KERIA (+ witness) and an IDSS-owned OIDC bridge behind the ADR 0016 seam; founding mints the founder's AID, the community's group AID, its credential registry and the founder's membership ACDC via signify-ts in place of the kanidm admin ceremony; members join and sign in by AID + membership credential. The map is done when every decision needed to /to-spec that is made.

Notes

  • Domain: ADR 0004 (OIDC given, KERI seam kept for v2), ADR 0016 (OIDC-only consumption), ADR 0038 (kanidm as built-in IdP) and the kanidm-specific tier built on them — 0073/0074/0078/0105/0116/0170, DDRs 0145/0158/0173. CONTEXT.md vocabulary throughout (member, community, IdP, gateway, rescue ladder).
  • Reference implementations: Matou/matou-app (org setup = mnemonic → passcode → KERIA agent → witnessed admin AID → org group AID → registry → schema OOBI → membership ACDC; registration + recovery flows; frontend/src/composables/useOrgSetup.ts, frontend/src/lib/keri/client.ts) and Matou/matou-identity (the IIP protocol/architecture v0.2 + any-sync prototype). Laptop clones: ~/Documents/1.projects/matou-app, ~/Documents/1.projects/matou-identity.
  • Skills: /grilling + /domain-modeling for grilling tickets; /research for research tickets; /prototype for the sign-in prototype. ADRs land in docs/adr/ (one sequence with DDRs — check origin/main for the next free number, 0192 at charting).
  • Standing rulings from charting (2026-08-24): shape = bridge (IDIP presents as an OIDC provider behind the seam; catalogue apps never notice); choice = founding-time opt-in, kanidm stays the default and no P1 volunteer is asked an identity question; KERIA lives on the community's gateway (not a shared Mātou KERIA); founder ceremony = mnemonic shown once; members = browser-minted AID on the community KERIA (no wallet app demanded in v1); suspension = ACDC revocation.
  • ADR 0174 applies: two-way doors resolve by agent, veto anytime; one-way doors (ADR amendments, protocol/crypto choices) are Ben's.

Decisions so far

  • Does a KERI/ACDC-backed OIDC provider already exist that runs on NixOS? — No. Nothing open-source authenticates by AID/ACDC; GLEIF's vlei-verifier is a verifier not an IdP, esatus's product is closed Keycloak; nothing KERI is in nixpkgs. Ruling stands: build, wrapping zitadel/oidc/v3 op in Go with a thin verifier against the gateway's KERIA; sub = member AID, groups from membership/komiti ACDCs, TEL issued-not-revoked = authorisation. Findings: branch research/keri-oidc-provider, docs/research/2026-08-24-keri-oidc-provider-landscape.md.
  • KERIA + witness + signify-ts on NixOS: packaging, footprint, and the version pins matou-app runs — fits the gateway floor; packaging must be built. Measured: KERIA ~40 MiB idle / ~120 MiB peak, witness ~40 MiB, ~3 MiB LMDB per agent, inception 1.5 s, issue 3 s. Nothing KERI is in nixpkgs — 4 pure-Python derivations (hio, multicommand, keri, keria) + a NixOS module; signify-ts is ready. matou-app pins KERIA 0.2.0-rc1 (monkey-patched) / signify-ts 0.3.0-rc2 vs upstream KERIA 0.4.0 / signify-ts 0.4.0 — five tags behind. Run 1–2 witnesses, not the 6-AID demo. Backup = the whole keripy root + witness db, quiesce-then-snapshot. Ingress: admin/CESR/boot/witness/schema as apex subdomains via Caddy 443, exempt from the ADR 0074 browser gate, /boot gated by invite-token forward_auth; witness TCP private. Findings: branch research/keria-stack-nixos, docs/research/2026-08-24-keria-stack-on-nixos.md.
  • What matou-app's org-setup, registration and recovery flows do step-by-step — the reuse inventory — one any-sync-free core in frontend/src/lib/keri/client.ts (mnemonic → bran → connect-or-boot → witnessed AID → group AID → registry → schema OOBI → issue + IPEX grant; recovery = re-derive bran + listAIDs); ~25 KERIClient methods, the schemas, recovery screen and admin approve steps reuse verbatim; drop /identity/set, /spaces/*, the space-invite smuggled in IPEX m, X-User-AID RBAC; hardening that must travel = witness-anchor polling, KEL push, agent-reboot detection. Live defects: multi-steward issuance forks a kt=1 group KEL (matou-app #62/#63), escrow until witnesses receipt (#51), KERIA rc1 never saves received ACDCs. Surfaced for the map: single issuing steward in v1; the KERIA data dir IS the identity (backup + rescue rung); schema OOBI must be gateway-reachable; invite links carry the recovery phrase. Findings: branch research/matou-app-keri-inventory, docs/research/2026-08-24-matou-app-keri-flow-inventory.md.
  • Amend ADR 0004/0016: how IDIP is offered at founding without asking a P1 volunteer an identity question — founding asks, everyone: new screen P1-S3a Identity between Brand kit and Access, kanidm preselected/recommended, IDIP the self-sovereign card with its consequence line; signal-gating/advanced-toggle/build-flavour rejected; seam unchanged; re-choice legal pre-deploy, locked after Founded. ADR 0194 (amends 0004/0016) + S3a flow node + wireframe landed.
  • Founder ceremony: mnemonic-shown-once replaces the kanidm admin password; rescue = recover-from-mnemonic — S6a gate between Review and stand-up: phrase shown once, 3-word confirm, honest loss statement; app persists only the derived passcode (OS keychain), never the mnemonic; rescue = three-rung 0088 ladder (recover-from-phrase / re-key-now / both-lost honestly named, community continuity → #737/#738); passkeys out for v1. ADR 0195 landed.
  • The OIDC bridge: build-vs-adopt ruling, claims/groups mapping, token lifetimes, where it runs — own core service idss-idp wrapping zitadel/oidc/v3, at id.<apex> (kanidm's slot); sub = AID, groups mirror kanidm 1:1 (membership ACDC = members, role = operators, one ACDC per committee); tokens 1h / refresh 30d with TEL re-check / session 12h / PKCE everywhere; stores no member records. ADR 0196 landed.
  • Who issues membership credentials in v1: a single issuing steward, or native multisig co-signing on the community group AID? — native multisig from founding (1-of-1 at founding, the /multisig/* exchange on every group event kills the fork); issue/revoke kt=1 of N, rotate by majority; "add a steward" is v1; solo founder nudged to add a second; stewards == operators. ADR 0197 landed.
  • Prototype: a browser proves AID control at the bridge's sign-in (signify-ts challenge/response + ACDC presentation) — proven live: repeat sign-in ≈7 s, passcode-per-sign-in viable; witness-down blocks join, not sign-in; revocation is invisible to a verifier agent — the bridge's TEL check must be served issuer-side via the keria adapter. Asset spikes/732-aid-signin/ + NOTES.md.
  • Member lifecycle under IDIP: invite = ACDC issuance to a browser-minted AID; suspension = revocation; the ADR 0073/0074/0078/0105 counterparts — invite token gates /boot; waiting = AID-without-credential; registry TEL = sole truth for standing (suspend = revoke + gate kill, removal adds roster archive, re-admission = fresh issuance); roster = runtime people; the keria adapter signs nothing — stewards' signify sessions sign, the adapter serves IsIssued to the bridge. ADR 0198 landed.
  • Which kanidm-specific surfaces get an IDIP counterpart vs are ruled out for IDIP communities — six rows, ADR 0199: credential floor N/A; branded login = native-brand bridge page; files door + Netbird ride the seam (Netbird flow check at build time); gate clients in Nix; mail OUT for IDIP-v1 (app-password store missing; S3a card says so honestly).
  • Founding wizard + stand-up rows for the IDIP path: screens, wireframes, seed-leg changes — DDR 0200: seed leg provisions the IDIP services; identity legs after the door probe, signify-ts in the renderer (keys never in the control plane); S6a recovery-phrase gate (not re-openable, fresh phrase per return) + four identity rows in the folded bar; kanidm "n of 5" untouched, IDIP "n of 7"; bridge sign-in + member join pages named for /to-spec.
  • The KERIA data dir IS the identity: backup, restore, and the rescue rung for 'witnesses have the KEL, agent is gone' — ADR 0201: one port-declared dataset (keripy root + witness state), quiesce-then-copy, atomic with the roster; restore names what's lost; no-backup rung = identities re-derive from passcodes, registry re-created, memberships bulk-reissued.

Not yet specified

(empty — the fog is cleared; destination reached 2026-08-24. See the closure comment for the final dispositions.)

Out of scope

  • Trust graphs, sybil scoring, elder attestations, COM/CTR/UTIL tokens — the wider IIP programme; this map is the identity substrate only.
  • any-sync spaces (matou-app's data layer) — IDSS has Files; not identity.
  • Migrating an existing kanidm community to IDIP — founding-time opt-in only (Q2 ruling); a fresh effort if ever.
  • Mātou-app interop (bring-your-own AID, wallet as credential holder, cross-community ACDCs) — the v2 direction ADR 0004 kept; a fresh effort, not this map's (closure ruling 2026-08-24).
  • Witness topology beyond the gateway's own witness (multi-witness pools, Mātou-run witnesses) — post-v1, fresh effort (closure ruling 2026-08-24).
  • Sharing credential schemas with matou-app — later, fresh effort; v1 mints its own (closure ruling 2026-08-24).
## Destination An IDSS community can be founded on **IDIP** (the Indigenous Digital Identity Protocol — KERI/ACDC, as implemented in `matou-app` with KERIA + signify-ts) **instead of kanidm**: the founder opts in at founding; the gateway stack runs KERIA (+ witness) and an IDSS-owned **OIDC bridge** behind the ADR 0016 seam; founding mints the founder's AID, the community's group AID, its credential registry and the founder's membership ACDC via signify-ts **in place of the kanidm admin ceremony**; members join and sign in by AID + membership credential. The map is done when every decision needed to `/to-spec` that is made. ## Notes - **Domain:** ADR 0004 (OIDC given, KERI seam kept for v2), ADR 0016 (OIDC-only consumption), ADR 0038 (kanidm as built-in IdP) and the kanidm-specific tier built on them — 0073/0074/0078/0105/0116/0170, DDRs 0145/0158/0173. `CONTEXT.md` vocabulary throughout (member, community, IdP, gateway, rescue ladder). - **Reference implementations:** `Matou/matou-app` (org setup = mnemonic → passcode → KERIA agent → witnessed admin AID → org group AID → registry → schema OOBI → membership ACDC; registration + recovery flows; `frontend/src/composables/useOrgSetup.ts`, `frontend/src/lib/keri/client.ts`) and `Matou/matou-identity` (the IIP protocol/architecture v0.2 + any-sync prototype). Laptop clones: `~/Documents/1.projects/matou-app`, `~/Documents/1.projects/matou-identity`. - **Skills:** `/grilling` + `/domain-modeling` for grilling tickets; `/research` for research tickets; `/prototype` for the sign-in prototype. ADRs land in `docs/adr/` (one sequence with DDRs — check `origin/main` for the next free number, 0192 at charting). - **Standing rulings from charting (2026-08-24):** shape = **bridge** (IDIP presents as an OIDC provider behind the seam; catalogue apps never notice); choice = **founding-time opt-in**, kanidm stays the default and no P1 volunteer is asked an identity question; KERIA lives **on the community's gateway** (not a shared Mātou KERIA); founder ceremony = **mnemonic shown once**; members = **browser-minted AID** on the community KERIA (no wallet app demanded in v1); suspension = ACDC revocation. - ADR 0174 applies: two-way doors resolve by agent, veto anytime; one-way doors (ADR amendments, protocol/crypto choices) are Ben's. ## Decisions so far <!-- one line per closed ticket --> - [Does a KERI/ACDC-backed OIDC provider already exist that runs on NixOS?](https://git.matou.nz/Matou/idss/issues/726) — **No.** Nothing open-source authenticates by AID/ACDC; GLEIF's vlei-verifier is a verifier not an IdP, esatus's product is closed Keycloak; nothing KERI is in nixpkgs. Ruling stands: **build**, wrapping `zitadel/oidc/v3 op` in Go with a thin verifier against the gateway's KERIA; `sub` = member AID, `groups` from membership/komiti ACDCs, TEL issued-not-revoked = authorisation. Findings: branch `research/keri-oidc-provider`, `docs/research/2026-08-24-keri-oidc-provider-landscape.md`. - [KERIA + witness + signify-ts on NixOS: packaging, footprint, and the version pins matou-app runs](https://git.matou.nz/Matou/idss/issues/727) — **fits the gateway floor; packaging must be built.** Measured: KERIA ~40 MiB idle / ~120 MiB peak, witness ~40 MiB, ~3 MiB LMDB per agent, inception 1.5 s, issue 3 s. Nothing KERI is in nixpkgs — 4 pure-Python derivations (hio, multicommand, keri, keria) + a NixOS module; signify-ts is ready. matou-app pins KERIA 0.2.0-rc1 (monkey-patched) / signify-ts 0.3.0-rc2 vs upstream KERIA 0.4.0 / signify-ts 0.4.0 — five tags behind. Run 1–2 witnesses, not the 6-AID demo. Backup = the whole keripy root + witness db, quiesce-then-snapshot. Ingress: admin/CESR/boot/witness/schema as apex subdomains via Caddy 443, exempt from the ADR 0074 browser gate, `/boot` gated by invite-token forward_auth; witness TCP private. Findings: branch `research/keria-stack-nixos`, `docs/research/2026-08-24-keria-stack-on-nixos.md`. - [What matou-app's org-setup, registration and recovery flows do step-by-step — the reuse inventory](https://git.matou.nz/Matou/idss/issues/728) — one any-sync-free core in `frontend/src/lib/keri/client.ts` (mnemonic → bran → connect-or-boot → witnessed AID → group AID → registry → schema OOBI → issue + IPEX grant; recovery = re-derive bran + `listAIDs`); ~25 `KERIClient` methods, the schemas, recovery screen and admin approve steps reuse verbatim; drop `/identity/set`, `/spaces/*`, the space-invite smuggled in IPEX `m`, X-User-AID RBAC; hardening that must travel = witness-anchor polling, KEL push, agent-reboot detection. Live defects: multi-steward issuance forks a kt=1 group KEL (matou-app #62/#63), escrow until witnesses receipt (#51), KERIA rc1 never saves received ACDCs. Surfaced for the map: single issuing steward in v1; the KERIA data dir IS the identity (backup + rescue rung); schema OOBI must be gateway-reachable; invite links carry the recovery phrase. Findings: branch `research/matou-app-keri-inventory`, `docs/research/2026-08-24-matou-app-keri-flow-inventory.md`. - [Amend ADR 0004/0016: how IDIP is offered at founding without asking a P1 volunteer an identity question](https://git.matou.nz/Matou/idss/issues/729) — **founding asks, everyone**: new screen P1-S3a Identity between Brand kit and Access, kanidm preselected/recommended, IDIP the self-sovereign card with its consequence line; signal-gating/advanced-toggle/build-flavour rejected; seam unchanged; re-choice legal pre-deploy, locked after Founded. ADR 0194 (amends 0004/0016) + S3a flow node + wireframe landed. - [Founder ceremony: mnemonic-shown-once replaces the kanidm admin password; rescue = recover-from-mnemonic](https://git.matou.nz/Matou/idss/issues/730) — **S6a gate** between Review and stand-up: phrase shown once, 3-word confirm, honest loss statement; app persists only the derived passcode (OS keychain), never the mnemonic; rescue = three-rung 0088 ladder (recover-from-phrase / re-key-now / both-lost honestly named, community continuity → #737/#738); passkeys out for v1. ADR 0195 landed. - [The OIDC bridge: build-vs-adopt ruling, claims/groups mapping, token lifetimes, where it runs](https://git.matou.nz/Matou/idss/issues/731) — **own core service `idss-idp`** wrapping `zitadel/oidc/v3`, at `id.<apex>` (kanidm's slot); `sub` = AID, groups mirror kanidm 1:1 (membership ACDC = members, role = operators, one ACDC per committee); tokens 1h / refresh 30d with TEL re-check / session 12h / PKCE everywhere; stores no member records. ADR 0196 landed. - [Who issues membership credentials in v1: a single issuing steward, or native multisig co-signing on the community group AID?](https://git.matou.nz/Matou/idss/issues/737) — **native multisig from founding** (1-of-1 at founding, the `/multisig/*` exchange on every group event kills the fork); issue/revoke `kt=1` of N, rotate by majority; "add a steward" is v1; solo founder nudged to add a second; stewards == operators. ADR 0197 landed. - [Prototype: a browser proves AID control at the bridge's sign-in (signify-ts challenge/response + ACDC presentation)](https://git.matou.nz/Matou/idss/issues/732) — **proven live**: repeat sign-in ≈7 s, passcode-per-sign-in viable; witness-down blocks join, not sign-in; **revocation is invisible to a verifier agent — the bridge's TEL check must be served issuer-side via the keria adapter**. Asset `spikes/732-aid-signin/` + NOTES.md. - [Member lifecycle under IDIP: invite = ACDC issuance to a browser-minted AID; suspension = revocation; the ADR 0073/0074/0078/0105 counterparts](https://git.matou.nz/Matou/idss/issues/733) — invite token gates `/boot`; waiting = AID-without-credential; registry TEL = sole truth for standing (suspend = revoke + gate kill, removal adds roster archive, re-admission = fresh issuance); roster = runtime people; the keria adapter signs nothing — stewards' signify sessions sign, the adapter serves `IsIssued` to the bridge. ADR 0198 landed. - [Which kanidm-specific surfaces get an IDIP counterpart vs are ruled out for IDIP communities](https://git.matou.nz/Matou/idss/issues/734) — six rows, ADR 0199: credential floor N/A; branded login = native-brand bridge page; files door + Netbird ride the seam (Netbird flow check at build time); gate clients in Nix; **mail OUT for IDIP-v1** (app-password store missing; S3a card says so honestly). - [Founding wizard + stand-up rows for the IDIP path: screens, wireframes, seed-leg changes](https://git.matou.nz/Matou/idss/issues/735) — DDR 0200: seed leg provisions the IDIP services; identity legs after the door probe, signify-ts in the renderer (keys never in the control plane); S6a recovery-phrase gate (not re-openable, fresh phrase per return) + four identity rows in the folded bar; kanidm "n of 5" untouched, IDIP "n of 7"; bridge sign-in + member join pages named for /to-spec. - [The KERIA data dir IS the identity: backup, restore, and the rescue rung for 'witnesses have the KEL, agent is gone'](https://git.matou.nz/Matou/idss/issues/738) — ADR 0201: one port-declared dataset (keripy root + witness state), quiesce-then-copy, atomic with the roster; restore names what's lost; no-backup rung = identities re-derive from passcodes, registry re-created, memberships bulk-reissued. ## Not yet specified _(empty — the fog is cleared; destination reached 2026-08-24. See the closure comment for the final dispositions.)_ ## Out of scope - Trust graphs, sybil scoring, elder attestations, COM/CTR/UTIL tokens — the wider IIP programme; this map is the identity substrate only. - any-sync spaces (matou-app's data layer) — IDSS has Files; not identity. - Migrating an existing kanidm community to IDIP — founding-time opt-in only (Q2 ruling); a fresh effort if ever. - **Mātou-app interop** (bring-your-own AID, wallet as credential holder, cross-community ACDCs) — the v2 direction ADR 0004 kept; a fresh effort, not this map's (closure ruling 2026-08-24). - **Witness topology beyond the gateway's own witness** (multi-witness pools, Mātou-run witnesses) — post-v1, fresh effort (closure ruling 2026-08-24). - **Sharing credential schemas with matou-app** — later, fresh effort; v1 mints its own (closure ruling 2026-08-24).
Author
Owner

Map closed — destination reached (Ben, 2026-08-24)

All 13 charted tickets resolved in one day (3 research, 7 grillings, 1 prototype, 2 graduated grillings). Design contract for /to-spec: ADRs 0194–0199, DDR 0200, ADR 0201 + wireframes p1-s3a-identity.html, p1-s6a-recovery-phrase.html, p1-s7x-identity-rows.html + the S3a/S6a edges in p1-founding.mermaid + research docs/research/2026-08-24-* + prototype findings spikes/732-aid-signin/NOTES.md.

Closure rulings (Ben, on the remaining fog):

  1. Invite-link threat model — answered by ADR 0198: the IDSS invite link carries only the single-use token; the phrase is minted in-browser at join (matou-app's carry-the-phrase hazard does not transfer).
  2. Witness topology, v1: the gateway's own witness (1–2, research #727) — already what ADRs 0196/0200 assume; anything wider is out of scope, a fresh effort.
  3. Schema governance, v1: IDSS mints its own schemas (membership with parameterised community name; committee), versioned in this repo, served by the gateway's schema server, SAIDs in rendered config; sharing with matou-app is a later effort.
  4. Mātou-app interop: out of scope — the v2 direction, its own effort when it comes.
  5. Steward co-sign surface: rides to the per-feature fan-out (grill-ux → wireframe), not a map decision.
  6. IDIP rehearsal journey: rides to /to-spec acceptance criteria + the rehearsal programme.

Next act in the pipeline: /to-spec for the IDIP identity-alternative feature, carrying the contract above. The map stays the parent artifact for post-v1 IDIP arcs (the #7 precedent).

## Map closed — destination reached (Ben, 2026-08-24) All 13 charted tickets resolved in one day (3 research, 7 grillings, 1 prototype, 2 graduated grillings). Design contract for `/to-spec`: **ADRs 0194–0199, DDR 0200, ADR 0201** + wireframes `p1-s3a-identity.html`, `p1-s6a-recovery-phrase.html`, `p1-s7x-identity-rows.html` + the S3a/S6a edges in `p1-founding.mermaid` + research `docs/research/2026-08-24-*` + prototype findings `spikes/732-aid-signin/NOTES.md`. **Closure rulings** (Ben, on the remaining fog): 1. **Invite-link threat model — answered by ADR 0198**: the IDSS invite link carries only the single-use token; the phrase is minted in-browser at join (matou-app's carry-the-phrase hazard does not transfer). 2. **Witness topology, v1**: the gateway's own witness (1–2, research #727) — already what ADRs 0196/0200 assume; anything wider is out of scope, a fresh effort. 3. **Schema governance, v1**: IDSS mints its own schemas (membership with parameterised community name; committee), versioned in this repo, served by the gateway's schema server, SAIDs in rendered config; sharing with matou-app is a later effort. 4. **Mātou-app interop**: out of scope — the v2 direction, its own effort when it comes. 5. **Steward co-sign surface**: rides to the per-feature fan-out (grill-ux → wireframe), not a map decision. 6. **IDIP rehearsal journey**: rides to `/to-spec` acceptance criteria + the rehearsal programme. **Next act in the pipeline:** `/to-spec` for the IDIP identity-alternative feature, carrying the contract above. The map stays the parent artifact for post-v1 IDIP arcs (the #7 precedent).
ben closed this issue 2026-08-24 18:34:34 +00:00
Author
Owner

Child spec published: #767 (ready-for-agent) — the /to-spec the map named as its next step. Four test seams confirmed by Ben (e2e drive, OIDC-over-HTTP smoke, member-orchestrator port binding, backup dataset port).

Child spec published: #767 (ready-for-agent) — the /to-spec the map named as its next step. Four test seams confirmed by Ben (e2e drive, OIDC-over-HTTP smoke, member-orchestrator port binding, backup dataset port).
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#725
No description provided.