Research: rehost mechanics on the pinned KERI stack — KEL/TEL portability, group witness rotation, agent re-derivation, tenant repoint #1303

Closed
opened 2026-09-07 19:42:51 +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

Rehost mechanics on the pinned KERI stack (charting ruling 6, the hard direction): moving a community from coa-shared to its own gateway without changing who anyone is. Research first-hand (keripy 1.2.2 / KERIA 0.2.0-rc1 / signify-ts 0.3.0-rc2, matou-infrastructure/keri, this repo's ADR 0201 restore rung and internal/keria/restore.go):

  1. KEL portability: pulling the group AID's, the stewards' and every member's KELs onto the gateway's KERIA through OOBIs from Mātou's witnesses; what a group hab needs to be reconstituted on a new agent (the founder re-deriving from the twelve words: does identifiers().create with the same name reproduce the same prefix, or must the existing KEL be adopted — and does signify-ts have an adopt path at all?).
  2. Witness rotation: a group rot cutting Mātou's witnesses and adding the gateway's (thresholds, toad, what a 1-of-1 vs 2-of-3 steward set signs, what happens to members who never see the rotation).
  3. Registry / TEL: the registry anchored in the group KEL, the per-steward registries matou-app makes, held credentials' TEL lookups after the move (issuer-side roster rebuild from the TEL).
  4. The tenant repoint: what Coa's tenant record and the app's cached client config must change to; what members' apps do at next launch (re-derive on the new backend automatically? re-enter words?).
  5. Honest limits: what cannot move (any-sync spaces, matou-app profiles), what the point-at interim (gateway door + roster against coa-shared's KERIA) needs from the descriptor.

Output: docs/research/2026-09-07-rehost-mechanics.md with a step table and the dead ends; 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 **Rehost mechanics** on the pinned KERI stack (charting ruling 6, the hard direction): moving a community from coa-shared to its own gateway without changing who anyone is. Research first-hand (keripy 1.2.2 / KERIA 0.2.0-rc1 / signify-ts 0.3.0-rc2, `matou-infrastructure/keri`, this repo's ADR 0201 restore rung and `internal/keria/restore.go`): 1. **KEL portability**: pulling the group AID's, the stewards' and every member's KELs onto the gateway's KERIA through OOBIs from Mātou's witnesses; what a group hab needs to be reconstituted on a new agent (the founder re-deriving from the twelve words: does `identifiers().create` with the same name reproduce the same prefix, or must the existing KEL be *adopted* — and does signify-ts have an adopt path at all?). 2. **Witness rotation**: a group `rot` cutting Mātou's witnesses and adding the gateway's (thresholds, `toad`, what a 1-of-1 vs 2-of-3 steward set signs, what happens to members who never see the rotation). 3. **Registry / TEL**: the registry anchored in the group KEL, the per-steward registries matou-app makes, held credentials' TEL lookups after the move (issuer-side roster rebuild from the TEL). 4. **The tenant repoint**: what Coa's tenant record and the app's cached client config must change to; what members' apps do at next launch (re-derive on the new backend automatically? re-enter words?). 5. **Honest limits**: what cannot move (any-sync spaces, matou-app profiles), what the point-at interim (gateway door + roster against coa-shared's KERIA) needs from the descriptor. Output: `docs/research/2026-09-07-rehost-mechanics.md` with a step table and the dead ends; no decisions.
Author
Owner

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

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

Resolution (research, 2026-09-07)

Findings: docs/research/2026-09-07-rehost-mechanics.md on branch research/rehost-mechanics (commit 78fe53bc, laptop checkout, unpushed): verdict, Q1–Q5, a 16-row step table, dead ends, 10 flagged unverified claims, a version-crossing hazard table; all claims cited. Nothing executed live.

1. Same twelve words ⇒ same AID is FALSE for wallet-minted identities. signify-ts derives only the controller AID from the bran; every identifiers().create without a bran karg mints a random per-AID salt (keeping.js:114-117), encrypted with the bran-derived AEID and stored on KERIA as sxlt. matou-app never passes bran (client.ts:279,283). Re-creating on a new KERIA mints a different prefix. This repo's own app passes the bran as the AID salt (app/src/lib/keri/inception.ts:52-69), so ADR 0201's "no-backup" rung holds for IDSS-minted identities and is false for the wallet's; the determinism proof tests only the IDSS shape. → This reaches beyond rehost: member adoption into the app (#1297) and the second-community rule (charting ruling 2) both assumed re-derivation. Adoption of a browser-minted (IDSS-shape) identity into the app still works IF the app connects to the same agent (same KERIA) — it never re-creates; but the wallet's own future mints must pass bran (or the salt must travel) for any cross-backend story to hold.

2. The per-AID salt is recoverable only while the old agent lives (identifiers().get → salty.sxlt, decrypted with the re-derived AEID). A member whose coa-shared agent is gone before migration has an unrecoverable identity — new AID, re-invite.

3. An existing AID CAN be adopted onto a new KERIA: POST /identifiers refuses only a taken name; with the KEL already pulled (OOBI / CESR push), the posted original inception is a duplicate-not-duplicitous event (keripy eventing.py:3789-3815) and SignifyHab.make records the hab + salty params. No library verb — signify-ts's create always incepts fresh keys — so it is an app-level POST over client.manager.new({sxlt,…}). Pull the KEL before adopting (misfit escrow otherwise).

4. The group hab has a first-class path: groups().join(name, rot, sigs, gid, smids, rmids) (grouping.py:86-203), needing every member KEL in kevers and the steward's personal hab adopted first; POST /identifiers with algo:'group' also works against an existing KEL.

5. Group witness rotation is feasible and the add-only half is already proven by the wallet's adoptOrgWitnesses; cuts ride the same call and keripy allows cut-all + add-disjoint in one rot with 1 ≤ toad ≤ |new|. New witnesses get the whole KEL via Receiptor.catchup; cut witnesses are never contacted. Wallet-minted groups are kt=nt=1 at every N (and ADR 0197 amendment 3 rules 1-of-N) → one steward signs.

6. Version-crossing hazard: the gateway is KERIA 0.4.0 / keripy 1.2.13 (DDR 0207), Mātou's patches dropped. Every endpoint/check above is unchanged in 0.4.0 (diffed), BUT keripy 1.2.13's catchup is byte-identical to the buggy 1.2.2 code Mātou patches (witness_catchup_patch.py) — a witness-adding rotation on a long KEL is exactly that failure. Also: 0.4.0's pyproject pins keri==1.2.12 (IDSS overrides to 1.2.13); signify-ts 0.3.0 ↔ KERIA 0.4.0 wire unverified; the wallet's exn-before-OOBI join flows depend on the dropped escrow patches.

7. Registry/TEL: KERIA has no client-facing TEL query; the reachable route is credentials().get(said, includeCESR) on the old agent → PUT / on the new agent's CESR door, then re-register the original vcp (SignifyRegistry.make tolerates the duplicate) — before the witness rotation. Else: fresh registry + bulk reissue.

8. The roster cannot be rebuilt from the TEL alone: holder AID and role live in the ACDC body (old agent's reger); username/email are any-sync/backend, nowhere in KERI.

9. Tenant repoint / next launch: the wallet's config-server URL is baked at build (kit.json configUrl), KERIA URLs read once at boot, 5-min cache; per-tenant keri.* in coa-shared tenant mode unverified. A member's next launch against the gateway hits agent does not exist → boot() → 403 from the invite-gated boot door, every launch; an authorised boot mints an empty agent. Nothing re-derives automatically.

10. Point-at needs from the descriptor: the bridge reads key state from the gateway KERIA's /oobi/{aid}, which refuses non-managed AIDs (ending.py:85-96), so the descriptor must name coa-shared's CESR door / Mātou's witnesses as the KEL source, carry their witness + schema OOBIs, and route /boot to coa-shared during point-at; the gateway roster must be seeded from the old agent's issued credentials.

Feeds the Coa-first grill (#1304), and finding 1 must be read by #1297 and the descriptor grill (#1295).

## Resolution (research, 2026-09-07) Findings: `docs/research/2026-09-07-rehost-mechanics.md` on branch `research/rehost-mechanics` (commit `78fe53bc`, laptop checkout, unpushed): verdict, Q1–Q5, a 16-row step table, dead ends, 10 flagged unverified claims, a version-crossing hazard table; all claims cited. Nothing executed live. **1. Same twelve words ⇒ same AID is FALSE for wallet-minted identities.** signify-ts derives only the *controller* AID from the bran; every `identifiers().create` without a `bran` karg mints a **random per-AID salt** (`keeping.js:114-117`), encrypted with the bran-derived AEID and stored on KERIA as `sxlt`. matou-app never passes `bran` (`client.ts:279,283`). Re-creating on a new KERIA mints a **different prefix**. This repo's own app passes the bran as the AID salt (`app/src/lib/keri/inception.ts:52-69`), so ADR 0201's "no-backup" rung holds for IDSS-minted identities and is **false for the wallet's**; the determinism proof tests only the IDSS shape. → This reaches beyond rehost: **member adoption into the app (#1297) and the second-community rule (charting ruling 2) both assumed re-derivation.** Adoption of a browser-minted (IDSS-shape) identity into the app still works IF the app connects to the same agent (same KERIA) — it never re-creates; but the wallet's own future mints must pass `bran` (or the salt must travel) for any cross-backend story to hold. **2. The per-AID salt is recoverable only while the old agent lives** (`identifiers().get` → `salty.sxlt`, decrypted with the re-derived AEID). A member whose coa-shared agent is gone before migration has an unrecoverable identity — new AID, re-invite. **3. An existing AID CAN be adopted onto a new KERIA**: `POST /identifiers` refuses only a taken *name*; with the KEL already pulled (OOBI / CESR push), the posted original inception is a duplicate-not-duplicitous event (`keripy eventing.py:3789-3815`) and `SignifyHab.make` records the hab + salty params. No library verb — signify-ts's `create` always incepts fresh keys — so it is an app-level POST over `client.manager.new({sxlt,…})`. Pull the KEL **before** adopting (misfit escrow otherwise). **4. The group hab has a first-class path**: `groups().join(name, rot, sigs, gid, smids, rmids)` (`grouping.py:86-203`), needing every member KEL in kevers and the steward's personal hab adopted first; `POST /identifiers` with `algo:'group'` also works against an existing KEL. **5. Group witness rotation is feasible** and the add-only half is already proven by the wallet's `adoptOrgWitnesses`; `cuts` ride the same call and keripy allows cut-all + add-disjoint in one `rot` with `1 ≤ toad ≤ |new|`. New witnesses get the whole KEL via `Receiptor.catchup`; cut witnesses are never contacted. Wallet-minted groups are `kt=nt=1` at every N (and ADR 0197 amendment 3 rules 1-of-N) → **one steward signs**. **6. Version-crossing hazard**: the gateway is KERIA 0.4.0 / keripy 1.2.13 (DDR 0207), Mātou's patches dropped. Every endpoint/check above is unchanged in 0.4.0 (diffed), BUT keripy 1.2.13's `catchup` is byte-identical to the buggy 1.2.2 code Mātou patches (`witness_catchup_patch.py`) — a witness-adding rotation on a long KEL is exactly that failure. Also: 0.4.0's pyproject pins `keri==1.2.12` (IDSS overrides to 1.2.13); signify-ts 0.3.0 ↔ KERIA 0.4.0 wire unverified; the wallet's exn-before-OOBI join flows depend on the dropped escrow patches. **7. Registry/TEL**: KERIA has no client-facing TEL query; the reachable route is `credentials().get(said, includeCESR)` on the old agent → `PUT /` on the new agent's CESR door, then re-register the **original** `vcp` (`SignifyRegistry.make` tolerates the duplicate) — before the witness rotation. Else: fresh registry + bulk reissue. **8. The roster cannot be rebuilt from the TEL alone**: holder AID and role live in the ACDC body (old agent's `reger`); username/email are any-sync/backend, nowhere in KERI. **9. Tenant repoint / next launch**: the wallet's config-server URL is baked at build (`kit.json` `configUrl`), KERIA URLs read once at boot, 5-min cache; per-tenant `keri.*` in coa-shared tenant mode unverified. A member's next launch against the gateway hits `agent does not exist` → `boot()` → **403** from the invite-gated boot door, every launch; an authorised boot mints an **empty** agent. **Nothing re-derives automatically.** **10. Point-at needs from the descriptor**: the bridge reads key state from the gateway KERIA's `/oobi/{aid}`, which refuses non-managed AIDs (`ending.py:85-96`), so the descriptor must name coa-shared's CESR door / Mātou's witnesses as the KEL source, carry their witness + schema OOBIs, and route `/boot` to coa-shared during point-at; the gateway roster must be seeded from the old agent's issued credentials. Feeds the Coa-first grill (#1304), and finding 1 must be read by #1297 and the descriptor grill (#1295).
ben closed this issue 2026-09-07 20:10:35 +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#1303
No description provided.