idip: live-bindings-for-e2e — retire the fakes: real Verifier, gate arming, browser sign-in module, stdio roster-anchor #890

Closed
opened 2026-08-27 05:43:04 +00:00 by matou-build-agent · 2 comments

Parent

Feature spec: #767 (idip; wayfinder map #725). Split out of the capstone drive #788 (ADR 0174 scoping ruling, 2026-08-27) — see docs/spike-findings/2026-08-27-idip-e2e-drive-788-scope.md.

Why this slice exists

The slice-map (Ben-confirmed 2026-08-24, docs/slices/idip.yaml) folded "the join point where the bridge meets the real keria adapter" into the e2e drive #788, on the ruling that the bridge "consumes IsIssued through the port's FAKE binding … the e2e drive joins them" — i.e. the join was assumed to be thin glue (swap one fake IsIssued for the real keria.Registry.IsIssued).

That assumption is false. The bridge's idp.Verifier (internal/idp/verifier.go:122-139) is four methods; only IsIssued has a real backing. The KERI challenge/response and ACDC presentation, the browser sign-in module, the stdio roster-anchor, and the gate arming are all unbuilt. Those are this slice; #788 is the drive that exercises them. The dev substrate exists locally (a live weboftrust/keria:0.2.0-rc1 + schema-server + signify-ts + Node on matou-workstation; spikes/732-aid-signin proves the conversation), so this is provable red→green here, no droplet.

What to build (retire the fakes — the live bindings the e2e drive joins)

  1. The real idp.Verifier binding. NewChallenge / VerifyChallenge / Presentation over the gateway's local KERIA, with IsIssued delegated to keria.Registry (the IssuanceOracle, internal/keria/registry.go:264). Retire DeniedVerifier() at control-plane/cmd/idss-idp/main.go:49; retire internal/idp/fake_verifier_test.go from the journey path.
    • Proposed design ruling (ADR 0174, adopt or veto): implement as a Node signify-ts sidecar the Go bridge calls, NOT a hand-rolled Go signify/CESR client. Rationale: signify-ts is the only proven KERIA client (there is no Go one anywhere in the repo), and spikes/732-aid-signin/keria.mjs ports.challenge / ports.present lift near-verbatim. Reimplementing signify in Go is out of scope for v1.
  2. Config plumbing + a persisted bridge agent. Parse IDSS_IDP_KERIA_ADMIN_URL / _CESR_URL in internal/idp/config.go (rendered at internal/clan/idssidp.go:244-245, currently dropped). Decide where the bridge's own agent salt/passcode lives and persists (the prototype boots a fresh randomPasscode() bridge agent each run — production needs a stable verifier identity).
  3. Gate arming in control-plane/cmd/control-plane/main.go: WithKeriBootGate(checker) <- keria.BootInvites.CheckBootToken; WithIdipMemberJoin(gate) <- keria.BootInvites + keria.Registry + a witness-health probe. Both are nil/absent today (fail-closed).
  4. The browser idssKeriSignIn module in app/src: derive passcode, answer GET /login/challenge, present the membership ACDC, POST {aid,challengeID,response,presentation} to /login/verify (and the device path). Referenced by internal/idp/brand.go:138-140 and deviceapprove.go:290-309; absent today.
  5. The stdio RosterAnchor binding: wire StewardApproveDriver's issuance/receipt anchor (app/src/lib/stewardApprove.ts) through a real keria/roster transport in app/src/lib/stdioBridge.ts + internal/stdiobridge — named but unbound today.

Acceptance criteria

  • Given the local KERIA stack, when a member holds an issued membership ACDC and signs in at the bridge, then VerifyChallenge + Presentation verify against live KERIA (issuer/schema/TEL checks, prototype #732's sequence) and a token is minted — proven red->green against the local stack, no droplet.
  • Given a revoked/waiting credential, then sign-in refuses with the honest outcome (ErrCredentialRevoked / ErrNoMembership), and IsIssued is served by the REAL keria.Registry (the port fake is not in the path).
  • Given control-plane and idss-idp binaries, then the boot gate and the /idip/join/{token} page have live bindings (no nil gate, WithIdipMemberJoin called).
  • Given a browser at the bridge login page, then window.idssKeriSignIn exists and drives the sign-in POST; given the steward approve driver, then its roster anchor persists through the stdio bridge.

Out of scope

  • The e2e drive harness itself (journey.idip.spec.ts, S3a-IDIP wizard fixture, idip target, the paid droplet run) — that stays #788, which depends on this.
  • A hand-rolled Go signify/CESR client (v2 direction if ever).
  • The kanidm path (untouched — byte-identical).

Ruled by agent under ADR 0174 — a decomposition of a Ben-confirmed slice on a discovered false assumption; revertible (re-merge into #788) and provable (the gap is cited against origin/main). Veto anytime.

## Parent Feature spec: #767 (idip; wayfinder map #725). Split out of the capstone drive #788 (ADR 0174 scoping ruling, 2026-08-27) — see `docs/spike-findings/2026-08-27-idip-e2e-drive-788-scope.md`. ## Why this slice exists The slice-map (Ben-confirmed 2026-08-24, `docs/slices/idip.yaml`) folded "the join point where the bridge meets the real keria adapter" into the e2e drive #788, on the ruling that the bridge "consumes IsIssued through the port's FAKE binding … the e2e drive joins them" — i.e. the join was assumed to be **thin glue** (swap one fake `IsIssued` for the real `keria.Registry.IsIssued`). That assumption is false. The bridge's `idp.Verifier` (`internal/idp/verifier.go:122-139`) is four methods; only `IsIssued` has a real backing. The KERI challenge/response and ACDC presentation, the browser sign-in module, the stdio roster-anchor, and the gate arming are all **unbuilt**. Those are this slice; #788 is the drive that exercises them. The dev substrate exists locally (a live `weboftrust/keria:0.2.0-rc1` + schema-server + signify-ts + Node on matou-workstation; `spikes/732-aid-signin` proves the conversation), so this is provable **red→green here, no droplet**. ## What to build (retire the fakes — the live bindings the e2e drive joins) 1. **The real `idp.Verifier` binding.** `NewChallenge` / `VerifyChallenge` / `Presentation` over the gateway's local KERIA, with `IsIssued` delegated to `keria.Registry` (the `IssuanceOracle`, `internal/keria/registry.go:264`). Retire `DeniedVerifier()` at `control-plane/cmd/idss-idp/main.go:49`; retire `internal/idp/fake_verifier_test.go` from the journey path. - **Proposed design ruling (ADR 0174, adopt or veto):** implement as a **Node signify-ts sidecar** the Go bridge calls, NOT a hand-rolled Go signify/CESR client. Rationale: signify-ts is the only proven KERIA client (there is no Go one anywhere in the repo), and `spikes/732-aid-signin/keria.mjs` `ports.challenge` / `ports.present` lift near-verbatim. Reimplementing signify in Go is out of scope for v1. 2. **Config plumbing + a persisted bridge agent.** Parse `IDSS_IDP_KERIA_ADMIN_URL` / `_CESR_URL` in `internal/idp/config.go` (rendered at `internal/clan/idssidp.go:244-245`, currently dropped). Decide where the bridge's own agent salt/passcode lives and persists (the prototype boots a fresh `randomPasscode()` bridge agent each run — production needs a stable verifier identity). 3. **Gate arming in `control-plane/cmd/control-plane/main.go`:** `WithKeriBootGate(checker)` <- `keria.BootInvites.CheckBootToken`; `WithIdipMemberJoin(gate)` <- `keria.BootInvites` + `keria.Registry` + a witness-health probe. Both are `nil`/absent today (fail-closed). 4. **The browser `idssKeriSignIn` module** in `app/src`: derive passcode, answer `GET /login/challenge`, present the membership ACDC, POST `{aid,challengeID,response,presentation}` to `/login/verify` (and the device path). Referenced by `internal/idp/brand.go:138-140` and `deviceapprove.go:290-309`; absent today. 5. **The stdio `RosterAnchor` binding:** wire `StewardApproveDriver`'s issuance/receipt anchor (`app/src/lib/stewardApprove.ts`) through a real keria/roster transport in `app/src/lib/stdioBridge.ts` + `internal/stdiobridge` — named but unbound today. ## Acceptance criteria - [ ] Given the local KERIA stack, when a member holds an issued membership ACDC and signs in at the bridge, then `VerifyChallenge` + `Presentation` verify against live KERIA (issuer/schema/TEL checks, prototype #732's sequence) and a token is minted — proven red->green against the local stack, no droplet. - [ ] Given a revoked/waiting credential, then sign-in refuses with the honest outcome (`ErrCredentialRevoked` / `ErrNoMembership`), and `IsIssued` is served by the REAL `keria.Registry` (the port fake is not in the path). - [ ] Given `control-plane` and `idss-idp` binaries, then the boot gate and the `/idip/join/{token}` page have live bindings (no `nil` gate, `WithIdipMemberJoin` called). - [ ] Given a browser at the bridge login page, then `window.idssKeriSignIn` exists and drives the sign-in POST; given the steward approve driver, then its roster anchor persists through the stdio bridge. ## Out of scope - The e2e drive harness itself (`journey.idip.spec.ts`, S3a-IDIP wizard fixture, `idip` target, the paid droplet run) — that stays #788, which depends on this. - A hand-rolled Go signify/CESR client (v2 direction if ever). - The kanidm path (untouched — byte-identical). Ruled by agent under ADR 0174 — a decomposition of a Ben-confirmed slice on a discovered false assumption; revertible (re-merge into #788) and provable (the gap is cited against `origin/main`). Veto anytime.
Author
Member

Ruled by agent under ADR 0174 — veto anytime. A drainer session took this ticket, corrected both premises of the #788 re-scope's "session-shaped crux", and proved the correction. Landed commit 510abf12.

What I proved (red→green, here, no droplet)

spikes/890-idip-verifier/prove-signin.mjs drives the whole IDIP sign-in conversation headless and green in ~30s: found community issuer AID + registry + schema → witnessed member → membership ACDC over IPEX + admit → witness-less bridge agent → VerifyChallenge (generate/respond/verify) → Presentation (member IPEX-grants the ACDC, bridge admits, checks issuer/schema/TEL) → revoke → issuer-side TEL flips to rev. Every method of the real idp.Verifier is exercised against a live KERIA, and keria.Registry.IsIssued is confirmed authoritative (revocation never reaches a verifier agent — prototype #732 re-verified). So the Node signify-ts sidecar design default is sound.

The substrate premise was WRONG — and is now corrected

The re-scope named the running matou-keria as "the live substrate". It cannot run the flow: it boots a start_keria.py patch set wired for matou-app's /matou/registration/* protocol, and /ipex/grant has no working behaviour there (Behavior for /ipex/grant missing) — so Presentation can never complete against it. The prototype proved against matou-infrastructure's compose with local witness-demo, a different stack. spikes/890-idip-verifier/bring-up.sh stands up an isolated copy (proto890) that does the full IPEX flow green. Recorded as GOTCHAS #103 (incl. the OOBI internal-port trap). Any build/CI/drive for the real Verifier must use a clean witness-demo KERIA, not matou-keria.

Landed this session (two-way door, tree-green)

  • internal/idp/config.go now parses IDSS_IDP_KERIA_ADMIN_URL / _CESR_URL (rendered at idssidp.go:244-245 but previously dropped) — TestLoadConfig_ParsesKeriaURLs, TestLoadConfig_KeriaURLsOptional. The crux now has the endpoints to dial.
  • spikes/890-idip-verifier/ (bring-up + prove-signin + tear-down), the findings doc docs/spike-findings/2026-08-27-idip-890-substrate.md, GOTCHAS #103, STATUS.

This ticket is FIVE slices, not one

Contract-mapped against origin/main this session:

  1. The real idp.Verifier (crux) — Node sidecar + Go adapter + persisted bridge agent. Provable against proto890.
  2. Config plumbing — ✅ landed above.
  3. Gate arming (control-plane/main.go:801) — swap WithKeriBootGate(nil) for a live *keria.BootInvites (CheckBootToken already satisfies controlapi.BootTokenChecker), + add WithIdipMemberJoin(gate). The join gate needs two pieces that don't exist yet: a non-spending invite peek on BootInvites (CheckBootToken spends), and a witness-health probe in internal/keria (none today).
  4. Browser idssKeriSignIn module — greenfield: app/ has no served-<script> browser bundle target (only the Electron renderer); the member-side challenge-respond + IPEX-present calls don't exist in app/src yet. Natural proof is a browser harness — belongs with the drive.
  5. Stdio RosterAnchor binding — stewardApprove.ts's anchorIssuance/confirmReceipt port is unbound; needs a new helper subcommand + Op/Handle arm (pattern: internal/founding/stdio.go) + a spawnHelperBridge channel.

Two genuinely-undesigned points inside the crux: (a) member-OOBI transport on idp.SignIn (carries AID, no OOBI); (b) the bridge's persisted agent salt/passcode lifecycle (the prototype boots a fresh randomPasscode() each run — production needs a stable verifier identity; touches secret-material handling).

Why human

The two-way-door work is landed. What remains is a multi-session, multi-language live bring-up across five slices with two open design points — and re-cutting a Ben-confirmed slice graph (docs/slices/idss.yaml, confirmed 2026-08-24) a third time, plus resourcing that build, is the same program-sequencing residue the #788 re-scope already routed to Ben (Ben's eyes, ADR 0174 §3). This ticket joins #788 at ready-for-human with the substrate now proven.

Proposed default (adopt or veto — the accept should be fast): file slices 1/3/4/5 as their own ready-for-session tickets blocking #788, slice 1 (crux) first, each with substrate = proto890 (not matou-keria); adopt the two design defaults in the findings doc (member OOBI carried on SignIn; bridge salt generated once into StateDirectory, fail-loud, never in repo). Full detail: docs/spike-findings/2026-08-27-idip-890-substrate.md.

**Ruled by agent under ADR 0174 — veto anytime.** A drainer session took this ticket, corrected **both** premises of the #788 re-scope's "session-shaped crux", and **proved** the correction. Landed commit `510abf12`. ### What I proved (red→green, here, no droplet) `spikes/890-idip-verifier/prove-signin.mjs` drives the **whole** IDIP sign-in conversation headless and green in ~30s: found community issuer AID + registry + schema → witnessed member → membership ACDC over IPEX + admit → **witness-less bridge agent** → **VerifyChallenge** (generate/respond/verify) → **Presentation** (member IPEX-grants the ACDC, bridge admits, checks issuer/schema/TEL) → **revoke** → issuer-side TEL flips to `rev`. Every method of the real `idp.Verifier` is exercised against a live KERIA, and `keria.Registry.IsIssued` is confirmed authoritative (revocation never reaches a verifier agent — prototype #732 re-verified). **So the Node signify-ts sidecar design default is sound.** ### The substrate premise was WRONG — and is now corrected The re-scope named the running `matou-keria` as "the live substrate". It **cannot** run the flow: it boots a `start_keria.py` patch set wired for matou-app's `/matou/registration/*` protocol, and `/ipex/grant` has no working behaviour there (`Behavior for /ipex/grant missing`) — so Presentation can never complete against it. The prototype proved against matou-**infrastructure**'s compose with local `witness-demo`, a *different* stack. `spikes/890-idip-verifier/bring-up.sh` stands up an isolated copy (`proto890`) that does the full IPEX flow green. Recorded as **GOTCHAS #103** (incl. the OOBI internal-port trap). **Any build/CI/drive for the real Verifier must use a clean witness-demo KERIA, not `matou-keria`.** ### Landed this session (two-way door, tree-green) - `internal/idp/config.go` now parses `IDSS_IDP_KERIA_ADMIN_URL` / `_CESR_URL` (rendered at `idssidp.go:244-245` but previously dropped) — `TestLoadConfig_ParsesKeriaURLs`, `TestLoadConfig_KeriaURLsOptional`. The crux now has the endpoints to dial. - `spikes/890-idip-verifier/` (bring-up + prove-signin + tear-down), the findings doc `docs/spike-findings/2026-08-27-idip-890-substrate.md`, GOTCHAS #103, STATUS. ### This ticket is FIVE slices, not one Contract-mapped against `origin/main` this session: 1. **The real `idp.Verifier`** (crux) — Node sidecar + Go adapter + persisted bridge agent. Provable against `proto890`. 2. **Config plumbing** — **✅ landed above.** 3. **Gate arming** (`control-plane/main.go:801`) — swap `WithKeriBootGate(nil)` for a live `*keria.BootInvites` (`CheckBootToken` already satisfies `controlapi.BootTokenChecker`), + add `WithIdipMemberJoin(gate)`. The join gate needs **two pieces that don't exist yet**: a non-spending invite *peek* on `BootInvites` (`CheckBootToken` spends), and a **witness-health probe** in `internal/keria` (none today). 4. **Browser `idssKeriSignIn` module** — greenfield: `app/` has no served-`<script>` browser bundle target (only the Electron renderer); the member-side challenge-respond + IPEX-present calls don't exist in `app/src` yet. Natural proof is a browser harness — belongs with the drive. 5. **Stdio `RosterAnchor` binding** — `stewardApprove.ts`'s `anchorIssuance`/`confirmReceipt` port is unbound; needs a new helper subcommand + `Op`/`Handle` arm (pattern: `internal/founding/stdio.go`) + a `spawnHelperBridge` channel. Two genuinely-**undesigned** points inside the crux: (a) member-OOBI transport on `idp.SignIn` (carries `AID`, no OOBI); (b) the bridge's **persisted** agent salt/passcode lifecycle (the prototype boots a fresh `randomPasscode()` each run — production needs a stable verifier identity; touches secret-material handling). ## Why human The two-way-door work is landed. What remains is a **multi-session, multi-language live bring-up across five slices with two open design points** — and re-cutting a **Ben-confirmed** slice graph (`docs/slices/idss.yaml`, confirmed 2026-08-24) a *third* time, plus resourcing that build, is the **same program-sequencing residue the #788 re-scope already routed to Ben** (Ben's eyes, ADR 0174 §3). This ticket joins #788 at `ready-for-human` with the substrate now proven. **Proposed default (adopt or veto — the accept should be fast):** file slices 1/3/4/5 as their own `ready-for-session` tickets blocking #788, **slice 1 (crux) first**, each with substrate = `proto890` (not `matou-keria`); adopt the two design defaults in the findings doc (member OOBI carried on `SignIn`; bridge salt generated once into `StateDirectory`, fail-loud, never in repo). Full detail: `docs/spike-findings/2026-08-27-idip-890-substrate.md`.
Owner

Landed on main this session (2026-08-27) — the four bindings this slice names, with one ruled variance, recorded as ADR 0212 (docs/adr/0212-idip-sign-in-verification-and-roster-wire.md):

  1. Real idp.Verifier — internal/keriauth (CESR decode + KEL key state, a lift of matou-app PR #33) + idp.KeriVerifier / idp.BindVerifier; cmd/idss-idp binds it when IDSS_IDP_KEYSTATE_URL + IDSS_IDP_CONTROL_PLANE_URL are rendered (56bd30e1). Challenge = signify 0B Cigar over idss-idp:<aid>:<nonce>, key state read off the KERIA CESR door on loopback. Presentation bytes are UNREAD this rung — membership comes from the issuer-side roster.
  2. Gate arming — productionIdip wires WithKeriBootGate(invites) + WithIdipMemberJoin(keria.JoinGate) + the roster surface over IDSS_STATE_DIR/keria (56bd30e1).
  3. Browser sign-in module — app/src/keriweb → dashboard/idip/keri-web.js: window.idssKeriJoin / idssKeriSignIn / idssKeriSteward.approve (56bd30e1, bb2df791).
  4. Roster anchor — ruled HTTP over the control plane's loopback API (/api/v1/idip/roster/*, bearer = gate secret), not a new stdio bridge: the roster must live on the gateway (the bridge reads it), and the steward's approve runs in the dashboard browser (the operator app has no gateway API client post-founding). Variance from this ticket's item 4; revertible per ADR 0174.

Also found on the way: keri-stack.nix had never been built (GOTCHAS #107). Closing on that evidence; #788 (the drive) is armed on the workstation executor and will prove these live.

Landed on `main` this session (2026-08-27) — the four bindings this slice names, with one ruled variance, recorded as **ADR 0212** (`docs/adr/0212-idip-sign-in-verification-and-roster-wire.md`): 1. **Real `idp.Verifier`** — `internal/keriauth` (CESR decode + KEL key state, a lift of matou-app PR #33) + `idp.KeriVerifier` / `idp.BindVerifier`; `cmd/idss-idp` binds it when `IDSS_IDP_KEYSTATE_URL` + `IDSS_IDP_CONTROL_PLANE_URL` are rendered (`56bd30e1`). Challenge = signify `0B` Cigar over `idss-idp:<aid>:<nonce>`, key state read off the KERIA CESR door on loopback. Presentation bytes are UNREAD this rung — membership comes from the issuer-side roster. 2. **Gate arming** — `productionIdip` wires `WithKeriBootGate(invites)` + `WithIdipMemberJoin(keria.JoinGate)` + the roster surface over `IDSS_STATE_DIR/keria` (`56bd30e1`). 3. **Browser sign-in module** — `app/src/keriweb` → `dashboard/idip/keri-web.js`: `window.idssKeriJoin` / `idssKeriSignIn` / `idssKeriSteward.approve` (`56bd30e1`, `bb2df791`). 4. **Roster anchor** — ruled **HTTP over the control plane's loopback API** (`/api/v1/idip/roster/*`, bearer = gate secret), not a new stdio bridge: the roster must live on the gateway (the bridge reads it), and the steward's approve runs in the dashboard browser (the operator app has no gateway API client post-founding). Variance from this ticket's item 4; revertible per ADR 0174. Also found on the way: `keri-stack.nix` had never been built (GOTCHAS #107). Closing on that evidence; #788 (the drive) is armed on the workstation executor and will prove these live.
ben closed this issue 2026-08-27 15:20:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#890
No description provided.