Research: how the Doorkeeper verifies a presented credential on the pinned stack — IPEX grant contents, revocation from witnessed KEL seals vs TEL fetch, holder binding, the verifier sidecar #1387

Closed
opened 2026-09-11 02:45:30 +00:00 by ben · 1 comment
Owner

Parent

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

Question

How the Doorkeeper verifies a presented credential on the pinned stack (ADR 0235 decision 5 — the Doorkeeper is a pure verifier: it receives no registrations, holds no copies, and answers "does this identity hold a valid credential of this kind" from the wallet's presentation + the witnesses). Establish, in the KERIA 0.4.0 / keripy 1.2.13 / signify-ts 0.4.0 source the gateway pins (DDR 0207) and the KERIA 0.2.0-rc1 + Mātou patches / signify-ts 0.3.0 the wallet runs:

  1. Presentation path. What an IPEX grant (or offer/present) from a matou-app wallet carries on the wire — ACDC, the registry iss event, the anchoring ixn, the issuer KEL — and what the receiving agent (the Doorkeeper's, on 0.4.0) does with it: does Tevery verify the iss against the issuer's witnessed KEL seal automatically? What must the Doorkeeper have resolved first (issuer OOBI, schema OOBI, registry)? Does the 0.2.0-rc1 → 0.4.0 crossing change anything for grant/admit?
  2. Revocation freshness without a ledger copy. Every iss/rev is anchored as a seal in the group AID's KEL, which the witnesses serve. Can a verifier decide "not revoked" from the witnessed KEL seals alone (seal i = credential SAID, s = 0 issued / 1 revoked), and does keripy's verifier accept that, or does it insist on the TEL event bytes? If the latter: how does a non-issuer agent fetch a registry's TEL events on 0.4.0 — the tels query route via the issuer agent's mailbox, credentials().state(), a registrar/backer — and which of those work when the issuer is a group AID whose agents live in stewards' browsers (often offline)?
  3. Holder binding. How the Doorkeeper ties the presenting AID to the credential's issuee (a.i) and to the bridge's signed challenge (ADR 0212 §1) — one identity, one session.
  4. The sidecar's shape for this narrower job (update research #1299's finding): signifypy 0.4.2 loop that (a) accepts the grant, (b) verifies, (c) answers the bridge over loopback — and whether the stock ipex handlers on 0.4.0 admit a grant without an admit round-trip to the wallet.
  5. Schema SAIDs: the wallet presents a credential in the gateway's membership schema (ADR 0226 schemas); confirm the Doorkeeper needs that schema resolved via OOBI before verification and where that OOBI is served on the gateway.

Capture findings on a throwaway research/doorkeeper-verification branch under docs/research/2026-09-10-doorkeeper-verification.md with a context pointer here; keep the doc under ~250 lines, file:line cited.

## 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 **How the Doorkeeper verifies a presented credential on the pinned stack** (ADR 0235 decision 5 — the Doorkeeper is a *pure verifier*: it receives no registrations, holds no copies, and answers "does this identity hold a valid credential of this kind" from the wallet's presentation + the witnesses). Establish, in the KERIA 0.4.0 / keripy 1.2.13 / signify-ts 0.4.0 source the gateway pins (DDR 0207) and the KERIA 0.2.0-rc1 + Mātou patches / signify-ts 0.3.0 the wallet runs: 1. **Presentation path.** What an IPEX `grant` (or `offer`/present) from a matou-app wallet carries on the wire — ACDC, the registry `iss` event, the anchoring `ixn`, the issuer KEL — and what the receiving agent (the Doorkeeper's, on 0.4.0) does with it: does `Tevery` verify the `iss` against the issuer's witnessed KEL seal automatically? What must the Doorkeeper have resolved first (issuer OOBI, schema OOBI, registry)? Does the 0.2.0-rc1 → 0.4.0 crossing change anything for `grant`/`admit`? 2. **Revocation freshness without a ledger copy.** Every `iss`/`rev` is anchored as a seal in the group AID's KEL, which the witnesses serve. Can a verifier decide "not revoked" from the witnessed KEL seals alone (seal `i` = credential SAID, `s` = 0 issued / 1 revoked), and does keripy's verifier accept that, or does it insist on the TEL event bytes? If the latter: how does a non-issuer agent fetch a registry's TEL events on 0.4.0 — the `tels` query route via the issuer agent's mailbox, `credentials().state()`, a registrar/backer — and which of those work when the issuer is a **group AID whose agents live in stewards' browsers** (often offline)? 3. **Holder binding.** How the Doorkeeper ties the presenting AID to the credential's issuee (`a.i`) and to the bridge's signed challenge (ADR 0212 §1) — one identity, one session. 4. **The sidecar's shape for this narrower job** (update research #1299's finding): signifypy 0.4.2 loop that (a) accepts the grant, (b) verifies, (c) answers the bridge over loopback — and whether the stock `ipex` handlers on 0.4.0 admit a grant without an `admit` round-trip to the wallet. 5. **Schema SAIDs**: the wallet presents a credential in the *gateway's* membership schema (ADR 0226 `schemas`); confirm the Doorkeeper needs that schema resolved via OOBI before verification and where that OOBI is served on the gateway. Capture findings on a throwaway `research/doorkeeper-verification` branch under `docs/research/2026-09-10-doorkeeper-verification.md` with a context pointer here; keep the doc under ~250 lines, file:line cited.
Author
Owner

Resolution — research landed: docs/research/2026-09-10-doorkeeper-verification.md (branch research/doorkeeper-verification, e52f265a; landed on main same day)

Read at the pinned tags (KERIA 0.4.0, keripy 1.2.13, signify-ts 0.4.0, signifypy 0.4.2, KERIA 0.2.0-rc1 + Mātou patches). Findings:

  1. A grant alone verifies nothing on stock 0.4.0. A grant is one exn with acdc/iss/anc embeds; the sender's KERIA streams issuer KEL + registry TEL + ACDC ahead of it. On receipt it is only a notification — the embeds are parsed when the Doorkeeper admits. The admit can be local (rec=[], no wallet round-trip; matou-app already uses this form), but the admitted credential is saved in the Doorkeeper's agent → "holds no copies" needs an explicit DELETE /credentials/{said} or a rewording. rc1 → 0.4.0 changes nothing here.
  2. Revocation: seal-only is decidable but not keripy's model. keripy's vcState walks stored TEL bytes; the KEL seal (i=SAID, s=0/1) is decidable in principle but no library path uses it. The TEL bytes are served by the gateway's witness over an unsigned GET /query?typ=tel — the issuing steward's gateway-side agent disseminates them once the anchor completes; no steward needs to be online at verify time. The presented TEL is always stale (a revocation never reaches the holder, #732) and keripy's Verifier saves a revoked credential rather than refusing it → the state read is the check, never the save.
  3. Holder binding is entirely the Doorkeeper's — nothing in keripy checks presenter == a.i; the exn signature proves control of exn.i; the bridge's challenge nonce can ride the signed m field.
  4. Sidecar shape: poll notifications → GET /exchanges/{said} → local admit → poll /credentials/{said} + /registries/{ri}/{said} → answer the bridge over loopback → delete the copy.
  5. Schemas: verification needs the schema in the agent's cache; on the gateway every agent auto-resolves KERIA_DURLS (both IDSS schemas, loopback :7723), so a Doorkeeper agent booted there has them; the public OOBI for the descriptor's schemas[kind].oobi is https://schema.<apex>/oobi/<SAID>.
  6. The wallet has no present-as-holder code — a matou-app obligation ADR 0235 does not list (pass stored attachments, includeCESR).

Finding that bends the design (for #1300's first question): because the witness serves KEL + TEL over unsigned GET and a grant is one signed exn with attachments, a no-agent alternative exists — the wallet posts the grant bytes in the presentation field ADR 0212 §2 already accepts, and the bridge verifies in Go (exn Ed25519 by the presenter's key — keriauth already does this; ACDC/iss SAID recompute; seal walk over the witness's KEL; schema by SAID from credschema). No Doorkeeper AID, no signify, no sidecar, no saved copy — hash + Ed25519 work, not a Go signify. It would retire doorkeeper{aid,oobi} and IPEX presentation. #1300 must rule between the two.

## Resolution — research landed: `docs/research/2026-09-10-doorkeeper-verification.md` (branch `research/doorkeeper-verification`, `e52f265a`; landed on main same day) Read at the pinned tags (KERIA 0.4.0, keripy 1.2.13, signify-ts 0.4.0, signifypy 0.4.2, KERIA 0.2.0-rc1 + Mātou patches). Findings: 1. **A grant alone verifies nothing on stock 0.4.0.** A grant is one `exn` with `acdc/iss/anc` embeds; the sender's KERIA streams issuer KEL + registry TEL + ACDC ahead of it. On receipt it is only a notification — the embeds are parsed **when the Doorkeeper admits**. The admit can be local (`rec=[]`, no wallet round-trip; matou-app already uses this form), but the admitted credential is **saved** in the Doorkeeper's agent → "holds no copies" needs an explicit `DELETE /credentials/{said}` or a rewording. rc1 → 0.4.0 changes nothing here. 2. **Revocation: seal-only is decidable but not keripy's model.** keripy's `vcState` walks stored TEL bytes; the KEL seal (`i`=SAID, `s`=0/1) is decidable in principle but no library path uses it. The TEL bytes are **served by the gateway's witness over an unsigned `GET /query?typ=tel`** — the issuing steward's gateway-side agent disseminates them once the anchor completes; no steward needs to be online at verify time. The presented TEL is always stale (a revocation never reaches the holder, #732) and keripy's Verifier saves a revoked credential rather than refusing it → **the state read is the check, never the save**. 3. **Holder binding is entirely the Doorkeeper's** — nothing in keripy checks presenter == `a.i`; the exn signature proves control of `exn.i`; the bridge's challenge nonce can ride the signed `m` field. 4. **Sidecar shape:** poll notifications → `GET /exchanges/{said}` → local admit → poll `/credentials/{said}` + `/registries/{ri}/{said}` → answer the bridge over loopback → delete the copy. 5. **Schemas:** verification needs the schema in the agent's cache; on the gateway every agent auto-resolves `KERIA_DURLS` (both IDSS schemas, loopback :7723), so a Doorkeeper agent booted there has them; the public OOBI for the descriptor's `schemas[kind].oobi` is `https://schema.<apex>/oobi/<SAID>`. 6. **The wallet has no present-as-holder code** — a matou-app obligation ADR 0235 does not list (pass stored attachments, `includeCESR`). **Finding that bends the design (for #1300's first question):** because the witness serves KEL + TEL over unsigned GET and a grant is one signed exn with attachments, a **no-agent alternative exists** — the wallet posts the grant bytes in the `presentation` field ADR 0212 §2 already accepts, and the **bridge verifies in Go** (exn Ed25519 by the presenter's key — `keriauth` already does this; ACDC/iss SAID recompute; seal walk over the witness's KEL; schema by SAID from `credschema`). No Doorkeeper AID, no signify, no sidecar, no saved copy — hash + Ed25519 work, not a Go signify. It would retire `doorkeeper{aid,oobi}` and IPEX presentation. #1300 must rule between the two.
ben closed this issue 2026-09-11 03:01:08 +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#1387
No description provided.