What matou-app's org-setup, registration and recovery flows do step-by-step — the reuse inventory #728

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

Parent

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

Question

Read Matou/matou-app (laptop clone ~/Documents/1.projects/matou-app): frontend/src/composables/useOrgSetup.ts, frontend/src/lib/keri/client.ts, the registration/invite flow (useCredentialPolling.ts, useAdminActions.ts, onboarding + identity stores), account recovery (mnemonic), docs/RBAC.md, docs/keria-per-agent-credential-isolation.md, docs/keri-credential-verification-report.md, the schema server and membership schema SAID, and the Playwright org-setup / registration / account-recovery projects. Produce the inventory: every signify-ts call in order, every OOBI/endpoint it needs, what state lands where (KERIA, backend, config server, secure storage), which parts are any-sync-specific (to drop), and which are reusable verbatim by the IDSS operator app's founding wizard, member invite, and rescue ladder.

## Parent Map: [IDIP as a core identity alternative to kanidm](https://git.matou.nz/Matou/idss/issues/725) (#725) ## Question Read `Matou/matou-app` (laptop clone `~/Documents/1.projects/matou-app`): `frontend/src/composables/useOrgSetup.ts`, `frontend/src/lib/keri/client.ts`, the registration/invite flow (`useCredentialPolling.ts`, `useAdminActions.ts`, onboarding + identity stores), account recovery (mnemonic), `docs/RBAC.md`, `docs/keria-per-agent-credential-isolation.md`, `docs/keri-credential-verification-report.md`, the schema server and membership schema SAID, and the Playwright `org-setup` / `registration` / `account-recovery` projects. Produce the inventory: every signify-ts call in order, every OOBI/endpoint it needs, what state lands where (KERIA, backend, config server, secure storage), which parts are any-sync-specific (to drop), and which are reusable verbatim by the IDSS operator app's founding wizard, member invite, and rescue ladder.
Author
Owner

Research landed — docs/research/2026-08-24-matou-app-keri-flow-inventory.md on branch research/matou-app-keri-inventory (commit 5eaeb45; matou-app read at 0469b41).

Summary:

  1. The four flows share one any-sync-free core in frontend/src/lib/keri/client.ts: mnemonic → bran (Salter over the first 16 bytes of the BIP-39 seed) → initialize (connect-or-boot + witness iurls resolve) → witnessed personal AID + agent end-role → group AID (algo:'group', isith/nsith '1', org half of the witness pool) → registry on the group AID → schema OOBI (ECg6np…, resolved by KERIA, not the browser) → credentials().issue + IPEX grant. Recipient = admit + 2 s poll ×60. Recovery = re-derive bran, reconnect, listAIDs.
  2. any-sync-specific and droppable: /api/v1/identity/set (mnemonic-derived peer key + space keys), all /api/v1/spaces/*, the space_invite JSON smuggled in the IPEX grant m field, profiles/init-member, the communitySpaceId/readOnlySpaceId/adminSpaceId config fields, the router's verifyCommunityAccess gate, multisig/rotation-signal SSE, X-User-AID RBAC, config-server e-mail relay.
  3. Reusable verbatim: ~25 KERIClient methods, lib/keri/{cesr,said,witnessAssignment,registry}.ts, agentLifecycle.ts, registrationResolve.ts, useClaimIdentity, useCredentialPolling (minus space branches), useRegistrationPolling, useAdminActions.{resolveApplicant,approve steps 1–3/6/8,decline,reissue}, RecoveryScreen, the 3 SAIDified schemas + SAIDify recipe; PR #33's Go internal/auth/* (signed-challenge login) is the reference for the OIDC bridge.
  4. Hardening that must travel: awaitGroupAnchorWitnessed (poll group.<ixn> op = every witness receipted), pushKelToAgent (CESR POST with CESR-DESTINATION), resolveViaWitnesses, queryKeyStateToSn, agent-reboot detection + end-role republish, bare-form OOBIs everywhere.
  5. Defects/drift: #45 closed (spec asserted legacy admin; the PUT ?type=ixn was swallowed end-role noise); #51 open — steward-issued credential stuck in escrow until witnesses receipt the group ixn (PR #52 awaiting live lap; timeout hypothesis refuted; group is 1-of-N); #60 → fixed by #61; #62/#63 open — two stewards issuing from a kt=1 group AID fork the KEL (no /multisig/ixn round), invitee sees duplicity, credential never lands; #18 signed auth designed but unmerged; KERIA v0.2.0rc1 never verifier-saves received ACDCs, so edges to the membership credential fail.
  6. Questions for the map: single issuing steward in v1 vs native /multisig/ixn co-sign; KERIA data dir is the identity (rescue rung for "witnesses have the KEL, agent gone"; backup engine must snapshot it); schema OOBI must be gateway-KERIA-reachable and the SAIDs belong in rendered config; invite links carry the invitee's recovery phrase; browser-minted members = the self-registration path with localStorage as the secure store.
**Research landed** — `docs/research/2026-08-24-matou-app-keri-flow-inventory.md` on branch `research/matou-app-keri-inventory` (commit `5eaeb45`; matou-app read at `0469b41`). Summary: 1. The four flows share one any-sync-free core in `frontend/src/lib/keri/client.ts`: mnemonic → bran (`Salter` over the first 16 bytes of the BIP-39 seed) → `initialize` (connect-or-boot + witness `iurls` resolve) → witnessed personal AID + agent end-role → group AID (`algo:'group'`, isith/nsith `'1'`, org half of the witness pool) → registry on the group AID → schema OOBI (`ECg6np…`, resolved by KERIA, not the browser) → `credentials().issue` + IPEX grant. Recipient = admit + 2 s poll ×60. Recovery = re-derive bran, reconnect, `listAIDs`. 2. any-sync-specific and droppable: `/api/v1/identity/set` (mnemonic-derived peer key + space keys), all `/api/v1/spaces/*`, the `space_invite` JSON smuggled in the IPEX grant `m` field, profiles/`init-member`, the `communitySpaceId/readOnlySpaceId/adminSpaceId` config fields, the router's `verifyCommunityAccess` gate, `multisig/rotation-signal` SSE, `X-User-AID` RBAC, config-server e-mail relay. 3. Reusable verbatim: ~25 `KERIClient` methods, `lib/keri/{cesr,said,witnessAssignment,registry}.ts`, `agentLifecycle.ts`, `registrationResolve.ts`, `useClaimIdentity`, `useCredentialPolling` (minus space branches), `useRegistrationPolling`, `useAdminActions.{resolveApplicant,approve steps 1–3/6/8,decline,reissue}`, `RecoveryScreen`, the 3 SAIDified schemas + SAIDify recipe; PR #33's Go `internal/auth/*` (signed-challenge login) is the reference for the OIDC bridge. 4. Hardening that must travel: `awaitGroupAnchorWitnessed` (poll `group.<ixn>` op = every witness receipted), `pushKelToAgent` (CESR POST with `CESR-DESTINATION`), `resolveViaWitnesses`, `queryKeyStateToSn`, agent-reboot detection + end-role republish, bare-form OOBIs everywhere. 5. Defects/drift: #45 closed (spec asserted legacy `admin`; the `PUT ?type=ixn` was swallowed end-role noise); #51 open — steward-issued credential stuck in escrow until witnesses receipt the group ixn (PR #52 awaiting live lap; timeout hypothesis refuted; group is 1-of-N); #60 → fixed by #61; #62/#63 open — **two stewards issuing from a kt=1 group AID fork the KEL** (no `/multisig/ixn` round), invitee sees duplicity, credential never lands; #18 signed auth designed but unmerged; KERIA v0.2.0rc1 never verifier-saves received ACDCs, so edges to the membership credential fail. 6. Questions for the map: single issuing steward in v1 vs native `/multisig/ixn` co-sign; KERIA data dir is the identity (rescue rung for "witnesses have the KEL, agent gone"; backup engine must snapshot it); schema OOBI must be gateway-KERIA-reachable and the SAIDs belong in rendered config; invite links carry the invitee's recovery phrase; browser-minted members = the self-registration path with `localStorage` as the secure store.
ben closed this issue 2026-08-24 01:35:38 +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#728
No description provided.