Research: hosting the Doorkeeper's signify session beside the Go bridge, the challenge round trip on KERIA 0.2.0-rc1, and vouching options #1299

Closed
opened 2026-09-07 19:42:00 +00:00 by ben · 2 comments
Owner

Parent

Map: The community wallet: matou-app holds and presents IDIP credentials, and the Coa and IDSS setups are paired (#1293)

Question

The Doorkeeper (charting ruling 4) needs a server-side signify session beside a Go bridge, and a way for a wallet to recognise it as the community's own. Research, first-hand against the pinned stack (signify-ts 0.3.0-rc2, KERIA 0.2.0-rc1 — source in the session scratchpad or matou-infrastructure/keri/node_modules):

  1. Driving the challenge API server-side: options for the sidecar — a Node process running signify-ts (systemd unit beside idss-idp, loopback-only HTTP for the bridge), any Go signify client worth trusting, keripy kli as a driver; what each needs from the KERIA boot door (a boot token minted at seeding like the founder's, ADR 0212 amendment) and how the passcode is held (a clan-vars secret, never rendered into a page).
  2. The challenge round trip on this KERIA: GET /challenges, an exn /challenge/response from a foreign AID landing in the doorkeeper's mailbox (does KERIA escrow it until the OOBI resolves? the matou …/pending patch), POST /challenges_verify/{aid} polling semantics, PUT marking; whether a bare OOBI of the member is enough for the doorkeeper to resolve.
  3. Vouching: delegation (the doorkeeper as a delegated AID of the group — what a multisig delegator costs on this KERIA) vs a credential issued by the group to the doorkeeper (schema, what the wallet checks) vs the descriptor simply naming the doorkeeper's AID (what that trusts). What matou-app's contact model can show.
  4. Rescue: what the doorkeeper adds to the ADR 0201 dataset; re-derive vs re-boot on restore.

Output: docs/research/2026-09-07-doorkeeper-hosting-and-vouching.md; no decisions.

## Parent Map: [The community wallet: matou-app holds and presents IDIP credentials, and the Coa and IDSS setups are paired](https://git.matou.nz/Matou/idss/issues/1293) (#1293) ## Question The **Doorkeeper** (charting ruling 4) needs a server-side signify session beside a Go bridge, and a way for a wallet to recognise it as the community's own. Research, first-hand against the pinned stack (signify-ts 0.3.0-rc2, KERIA 0.2.0-rc1 — source in the session scratchpad or `matou-infrastructure/keri/node_modules`): 1. **Driving the challenge API server-side**: options for the sidecar — a Node process running signify-ts (systemd unit beside `idss-idp`, loopback-only HTTP for the bridge), any Go signify client worth trusting, keripy `kli` as a driver; what each needs from the KERIA boot door (a boot token minted at seeding like the founder's, ADR 0212 amendment) and how the passcode is held (a clan-vars secret, never rendered into a page). 2. **The challenge round trip on this KERIA**: `GET /challenges`, an exn `/challenge/response` from a *foreign* AID landing in the doorkeeper's mailbox (does KERIA escrow it until the OOBI resolves? the matou `…/pending` patch), `POST /challenges_verify/{aid}` polling semantics, `PUT` marking; whether a *bare* OOBI of the member is enough for the doorkeeper to resolve. 3. **Vouching**: delegation (the doorkeeper as a delegated AID of the group — what a multisig delegator costs on this KERIA) vs a credential issued by the group to the doorkeeper (schema, what the wallet checks) vs the descriptor simply naming the doorkeeper's AID (what that trusts). What matou-app's contact model can show. 4. **Rescue**: what the doorkeeper adds to the ADR 0201 dataset; re-derive vs re-boot on restore. Output: `docs/research/2026-09-07-doorkeeper-hosting-and-vouching.md`; no decisions.
Author
Owner

Claimed 2026-09-07 (charting session). Research subagent fired inline; findings land on branch research/doorkeeper-hosting-and-vouching as docs/research/2026-09-07-doorkeeper-hosting-and-vouching.md (laptop checkout, unpushed until reviewed).

Claimed 2026-09-07 (charting session). Research subagent fired inline; findings land on branch `research/doorkeeper-hosting-and-vouching` as `docs/research/2026-09-07-doorkeeper-hosting-and-vouching.md` (laptop checkout, unpushed until reviewed).
ben self-assigned this 2026-09-07 19:45:48 +00:00
Author
Owner

Resolution (research, 2026-09-07)

Findings: docs/research/2026-09-07-doorkeeper-hosting-and-vouching.md on branch research/doorkeeper-hosting-and-vouching (commit 6d769594, laptop checkout, unpushed). Read against BOTH generations — KERIA 0.2.0-rc1/keripy 1.2.2 (the wallet's stack) and KERIA 0.4.0/keripy 1.2.13 (the gateway's, DDR 0207) — with a §5 version-difference table. Nothing was executed against a running KERIA; the challenge verbs are the one route family no IDSS drive has exercised on either generation. Note: matou-app resolves signify-ts 0.3.0 (pnpm-lock.yaml), not the DDR 0207 names.

1. A foreign exn does NOT arrive usable without a prior OOBI resolve on the doorkeeper side. Unknown sender → escrow (exchanging.py:89-91); the cued KEL query is a no-op for an unknown AID (agenting.py:462-464); the escrow is dropped silently after TimeoutPSE = 20 s on 1.2.13 (10 s on 1.2.2). It IS re-processed if the resolve lands inside that window. This is the gap matou's dropped …/pending patch covered. Consequence for the sign-in design: the wallet's OOBI (bare form is enough — KEL + delegation chain + end roles + witness locs, if fully witnessed and addEndRole('agent') was run) must reach the doorkeeper before or within 20 s of the exn — i.e. the sign-in bootstrap must carry the member's OOBI to the bridge (QR round trip or a first HTTP call), the doorkeeper resolves, then the exn lands.

2. Delivery is direct to the doorkeeper's agent end URL — KERIA never reads witness mailboxes — so the doorkeeper needs the agent end role and public curls (the gateway already has https://keria-cesr.<apex>/). The wallet must oobis().resolve the doorkeeper first (/identifiers/{name}/exchanges 400s for unknown recipients).

3. POST /challenges_verify/{aid} 404s unless the source is in kevers; the long-running op is done only when a stored exn's words match — no error, no timeout, never auto-removed, one op per source AID at a time (name collision overwrites); db.reps/db.exns grow unbounded. The sidecar must time out and clean up itself.

4. Sidecar viability. Every driving call is a Signify-signed admin request → a Signify client is unavoidable. No Go signify exists (signify-go 404, kerigo archived 2023, et-tu-cesr is a parser) and ADR 0200 forbids writing one. Node is NOT in the gateway's Nix closure. signifypy 0.4.2 (keri>=1.2.12,<1.3, matches the gateway's keripy, same 4 challenge verbs) drops into the existing keriaEnv python set — cheapest packaging, least-adopted client. kli challenge generate/respond/verify exist and kli is already on the gateway, but verify is a 300 s blocking mailbox-poll on a kli keystore (no KERIA agent, a new dataset tree).

5. Boot and passcode. :3903 is ungated over loopback (only Caddy forward_auths the public name), so a sidecar needs no invite — or rides a second founder-style bootstrap mint (FounderBootActor path) for ledger posture. Passcode = a clan-vars generator in the renderIdssIdpGateGenerator shape, delivered as a file path; regenerating it is a re-key of the door.

6. Vouching. Delegation: verified by the wallet's own KERIA at OOBI time (a dip without the group's anchoring seal never enters kevers, eventing.py:2755-2790); the wallet checks keyStates().get(dk).di == community AID. Costs: the group must exist first (so NOT at seeding — after the founder's group inception), one steward delegations().approve (kt=1 → one signature), and again on every doorkeeper rotation. Credential: a new schema SAID, a registry entry, an admit rail on the doorkeeper, and a TEL lookup in every wallet (signify-ts has no client-side ACDC verify) — buys revocability only. Descriptor-only = TLS trust. Contacts model shows challenges: [{dt, words, said, authenticated}] per contact — the mutual-challenge direction; nothing about delegation.

7. Rescue. A KERIA-hosted doorkeeper adds nothing to the ADR 0201 dataset (it lives under /var/lib/keria) but the passcode var must be restored too; on the no-backup rung the same doorkeeper AID re-derives with a new agent AID, addEndRole must be re-run, and the descriptor must carry the bare OOBI form (which survives agent re-boots).

8. Cross-generation wire (0.2.0-rc1 wallet agent → 0.4.0 doorkeeper): routes, bodies, exn shape and the CESR door are identical; the only behavioural delta is the 10 s vs 20 s escrow window.

Feeds the doorkeeper grill (#1300) and the sign-in prototype (#1301): the prototype must include the OOBI-first bootstrap and the sidecar's own timeout.

## Resolution (research, 2026-09-07) Findings: `docs/research/2026-09-07-doorkeeper-hosting-and-vouching.md` on branch `research/doorkeeper-hosting-and-vouching` (commit `6d769594`, laptop checkout, unpushed). Read against BOTH generations — KERIA 0.2.0-rc1/keripy 1.2.2 (the wallet's stack) and KERIA 0.4.0/keripy 1.2.13 (the gateway's, DDR 0207) — with a §5 version-difference table. Nothing was executed against a running KERIA; the challenge verbs are the one route family no IDSS drive has exercised on either generation. Note: matou-app resolves signify-ts **0.3.0** (`pnpm-lock.yaml`), not the DDR 0207 names. **1. A foreign exn does NOT arrive usable without a prior OOBI resolve on the doorkeeper side.** Unknown sender → escrow (`exchanging.py:89-91`); the cued KEL query is a no-op for an unknown AID (`agenting.py:462-464`); the escrow is dropped silently after `TimeoutPSE` = 20 s on 1.2.13 (10 s on 1.2.2). It IS re-processed if the resolve lands inside that window. This is the gap matou's dropped `…/pending` patch covered. Consequence for the sign-in design: the wallet's OOBI (bare form is enough — KEL + delegation chain + end roles + witness locs, **if** fully witnessed and `addEndRole('agent')` was run) must reach the doorkeeper before or within 20 s of the exn — i.e. the sign-in bootstrap must carry the member's OOBI to the bridge (QR round trip or a first HTTP call), the doorkeeper resolves, then the exn lands. **2. Delivery is direct to the doorkeeper's `agent` end URL** — KERIA never reads witness mailboxes — so the doorkeeper needs the `agent` end role and public `curls` (the gateway already has `https://keria-cesr.<apex>/`). The wallet must `oobis().resolve` the doorkeeper first (`/identifiers/{name}/exchanges` 400s for unknown recipients). **3. `POST /challenges_verify/{aid}`** 404s unless the source is in `kevers`; the long-running op is `done` only when a stored exn's words match — no error, no timeout, never auto-removed, one op per source AID at a time (name collision overwrites); `db.reps`/`db.exns` grow unbounded. The sidecar must time out and clean up itself. **4. Sidecar viability.** Every driving call is a Signify-signed admin request → a Signify client is unavoidable. **No Go signify exists** (signify-go 404, kerigo archived 2023, et-tu-cesr is a parser) and ADR 0200 forbids writing one. Node is NOT in the gateway's Nix closure. **signifypy 0.4.2** (`keri>=1.2.12,<1.3`, matches the gateway's keripy, same 4 challenge verbs) drops into the existing `keriaEnv` python set — cheapest packaging, least-adopted client. `kli challenge generate/respond/verify` exist and `kli` is already on the gateway, but verify is a 300 s blocking mailbox-poll on a kli keystore (no KERIA agent, a new dataset tree). **5. Boot and passcode.** `:3903` is ungated over loopback (only Caddy forward_auths the public name), so a sidecar needs no invite — or rides a second founder-style bootstrap mint (`FounderBootActor` path) for ledger posture. Passcode = a clan-vars generator in the `renderIdssIdpGateGenerator` shape, delivered as a file path; regenerating it is a re-key of the door. **6. Vouching.** *Delegation*: verified by the wallet's own KERIA at OOBI time (a `dip` without the group's anchoring seal never enters `kevers`, `eventing.py:2755-2790`); the wallet checks `keyStates().get(dk).di == community AID`. Costs: the group must exist first (so NOT at seeding — after the founder's group inception), one steward `delegations().approve` (kt=1 → one signature), and again on every doorkeeper rotation. *Credential*: a new schema SAID, a registry entry, an admit rail on the doorkeeper, and a TEL lookup in every wallet (signify-ts has no client-side ACDC verify) — buys revocability only. *Descriptor-only* = TLS trust. Contacts model shows `challenges: [{dt, words, said, authenticated}]` per contact — the mutual-challenge direction; nothing about delegation. **7. Rescue.** A KERIA-hosted doorkeeper adds **nothing** to the ADR 0201 dataset (it lives under `/var/lib/keria`) but the passcode var must be restored too; on the no-backup rung the same doorkeeper AID re-derives with a **new agent AID**, `addEndRole` must be re-run, and the descriptor must carry the bare OOBI form (which survives agent re-boots). **8. Cross-generation wire** (0.2.0-rc1 wallet agent → 0.4.0 doorkeeper): routes, bodies, exn shape and the CESR door are identical; the only behavioural delta is the 10 s vs 20 s escrow window. Feeds the doorkeeper grill (#1300) and the sign-in prototype (#1301): the prototype must include the OOBI-first bootstrap and the sidecar's own timeout.
ben closed this issue 2026-09-07 20:06:44 +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#1299
No description provided.