idip: keria-adapter-core — the third member-orchestrator-port binding: /boot invite gate, roster, IsIssued #775

Closed
opened 2026-08-25 04:26:58 +00:00 by ben · 2 comments
Owner

Parent

Feature spec: #767 (idip; wayfinder map #725).

What to build

The keria adapter (ADR 0198): the third binding behind the member-orchestrator port family (ADR 0077: fake, kanidm, keria), owning only the unsigned surface — the control plane signs nothing (group keys live in stewards' agents, ADR 0197). It owns: single-use invite-token mint/spend backing the /boot forward-auth gate (the invite token IS the authorisation to boot an agent — no live token, no agent, no drive-by AID minting); the members roster (AID, username, email, role, committees) as runtime people, never re-rendered from declarative config (ADR 0105); member orchestration state; and IsIssued — the authoritative issued/not-revoked answer the bridge consults at sign-in and every refresh (prototype #732: revocation is invisible to a verifier agent, the check must be issuer-side). Issued/revoked transitions are recorded only after witness-receipt confirmation, anchoring the roster to the TEL. Tests run against the real packaged stack (slice-map ruling).

Acceptance criteria

  • (story 19, gate half) Given a minted invite token, when /boot is called with it, then the boot proceeds and the token is spent (single-use); without a live token, /boot is refused.
  • (story 25) Given roster writes, when issuance or revocation completes, then the roster records the transition only after witness receipt, and the roster survives a redeploy untouched (runtime people, ADR 0105).
  • Given IsIssued, when a credential is issued / revoked, then the answer flips accordingly and is served to callers (the bridge's contract).
  • Given the port family's contract tests, when run against the keria binding, then the shared member-port contracts hold.

Blocked by

  • #771 — idip:keri-stack-nix
  • #773 — idip:credential-schemas
  • engine-adapters:member-orbit-adapters (#181 arc) (done — satisfied)
  • members:invites (#34 arc) (done — satisfied)

Task manifest

task: idip:keria-adapter-core
interface: the keria binding of the member-orchestrator ports (ADR 0077) — invite-token mint/spend + /boot
  forward-auth answer, runtime-people roster, orchestration state, IsIssued (issuer-side issued/not-revoked)
  recorded post-witness-receipt; signs nothing
seam: member-orchestrator port contract tests run against the keria binding + the real packaged stack
  (slice-map ruling), plus the IsIssued contract (issue→true, revoke→false, post-receipt only)
acceptance:
- given: a minted single-use invite token
  when: /boot is called with/without it
  then: boot proceeds and token spends / refusal
- given: issuance or revocation
  when: witness receipt confirms
  then: roster + IsIssued flip — never before receipt
- given: a gateway redeploy
  when: it completes
  then: the roster is untouched (runtime people)
depends_on:
- keri-stack-nix
- credential-schemas
- engine-adapters:member-orbit-adapters
- members:invites
out_of_scope:
- signing acts (issue/revoke/rotate) — steward slices via signify sessions
- the join page UI — member-join-page
- the bridge itself — idss-idp-bridge
- the identity backup dataset — identity-dataset-backup
needs_human_decision: []
## Parent Feature spec: #767 (idip; wayfinder map #725). ## What to build The keria adapter (ADR 0198): the third binding behind the member-orchestrator port family (ADR 0077: fake, kanidm, keria), owning only the unsigned surface — the control plane signs nothing (group keys live in stewards' agents, ADR 0197). It owns: single-use invite-token mint/spend backing the `/boot` forward-auth gate (the invite token IS the authorisation to boot an agent — no live token, no agent, no drive-by AID minting); the members roster (AID, username, email, role, committees) as runtime people, never re-rendered from declarative config (ADR 0105); member orchestration state; and `IsIssued` — the authoritative issued/not-revoked answer the bridge consults at sign-in and every refresh (prototype #732: revocation is invisible to a verifier agent, the check must be issuer-side). Issued/revoked transitions are recorded only after witness-receipt confirmation, anchoring the roster to the TEL. Tests run against the real packaged stack (slice-map ruling). ## Acceptance criteria - [ ] (story 19, gate half) Given a minted invite token, when `/boot` is called with it, then the boot proceeds and the token is spent (single-use); without a live token, `/boot` is refused. - [ ] (story 25) Given roster writes, when issuance or revocation completes, then the roster records the transition only after witness receipt, and the roster survives a redeploy untouched (runtime people, ADR 0105). - [ ] Given `IsIssued`, when a credential is issued / revoked, then the answer flips accordingly and is served to callers (the bridge's contract). - [ ] Given the port family's contract tests, when run against the keria binding, then the shared member-port contracts hold. ## Blocked by - #771 — idip:keri-stack-nix - #773 — idip:credential-schemas - engine-adapters:member-orbit-adapters (#181 arc) (done — satisfied) - members:invites (#34 arc) (done — satisfied) ## Task manifest ```yaml task: idip:keria-adapter-core interface: the keria binding of the member-orchestrator ports (ADR 0077) — invite-token mint/spend + /boot forward-auth answer, runtime-people roster, orchestration state, IsIssued (issuer-side issued/not-revoked) recorded post-witness-receipt; signs nothing seam: member-orchestrator port contract tests run against the keria binding + the real packaged stack (slice-map ruling), plus the IsIssued contract (issue→true, revoke→false, post-receipt only) acceptance: - given: a minted single-use invite token when: /boot is called with/without it then: boot proceeds and token spends / refusal - given: issuance or revocation when: witness receipt confirms then: roster + IsIssued flip — never before receipt - given: a gateway redeploy when: it completes then: the roster is untouched (runtime people) depends_on: - keri-stack-nix - credential-schemas - engine-adapters:member-orbit-adapters - members:invites out_of_scope: - signing acts (issue/revoke/rotate) — steward slices via signify sessions - the join page UI — member-join-page - the bridge itself — idss-idp-bridge - the identity backup dataset — identity-dataset-backup needs_human_decision: [] ```

swarm-claim host=elitebook-distributed-server-03 run=10057
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=10057 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #775 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 775,
  "status": "success",
  "commits": [
    "a22c1c40698fcef7899cf1f1dccfb697369c1e8f"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/keria/invite.go",
    "internal/keria/invite_test.go",
    "internal/keria/keria.go",
    "internal/keria/registry.go",
    "internal/keria/registry_test.go",
    "internal/keria/stack_smoke_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/keria/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/keria/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/controlapi/ ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "pre-push go-ci gate (build/vet/test/golangci-lint whole tree)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(story 19, gate half) minted invite token → /boot proceeds and the token is spent (single-use); without a live token /boot is refused": "internal/keria/invite.go BootInvites.CheckBootToken (single-use spend, satisfies controlapi.BootTokenChecker); proven end-to-end through the REAL WithKeriBootGate handler in TestBootGate_KeriaBindingOpensALiveInviteSpendsItRefusesTheRest (204 live → 403 spent/absent/bogus) and unit TestCheckBootToken_LiveOnceThenSpent",
    "(story 25) issuance/revocation records the transition only after witness receipt; roster survives a redeploy untouched (runtime people, ADR 0105)": "internal/keria/registry.go two-phase escrow: AnchorIssuance/AnchorRevocation record WITHOUT flipping standing, only ConfirmReceipt flips (TestIsIssued_FlipsOnlyAfterWitnessReceipt); roster persisted via jsonstore.File in the control-plane state dir — TestFileRegistry_RosterSurvivesRedeploy re-opens over the same file and finds the member + issued standing intact",
    "IsIssued flips issued→true / revoked→false and is served to callers (the bridge's contract)": "internal/keria/registry.go Registry.IsIssued (issuer-side, matches idp.Verifier.IsIssued signature; var _ IssuanceOracle assertion); TestIsIssued_FlipsOnlyAfterWitnessReceipt + TestIsIssued_UnknownSAIDReadsFalse + TestRegistry_ReAdmissionIsAFreshIssuance",
    "the port family's contract tests hold against the keria binding": "var _ controlapi.BootTokenChecker = (*BootInvites)(nil) and the idp.Verifier.IsIssued one-method assertion on *Registry (invite_test.go / registry_test.go), driven through the real /boot forward-auth handler; illegal-transition + idempotency contracts in TestRegistry_RejectsIllegalTransitions and TestJoin_IdempotentDoesNotResetStanding; gated real-packaged-stack smoke TestKeriaStack_Smoke (IDSS_KERIA_SMOKE=1, seedcommunity-eval idiom) probes the #771 doors, skipping cleanly without the stack"
  },
  "summary": "Built the keria adapter's unsigned surface (internal/keria): single-use invite-token mint/spend backing the /boot forward-auth gate, the runtime-people roster, and issuer-side IsIssued recorded only after a two-phase witness-receipt escrow.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #775 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 775, "status": "success", "commits": [ "a22c1c40698fcef7899cf1f1dccfb697369c1e8f" ], "changed_files": [ "STATUS.md", "internal/keria/invite.go", "internal/keria/invite_test.go", "internal/keria/keria.go", "internal/keria/registry.go", "internal/keria/registry_test.go", "internal/keria/stack_smoke_test.go" ], "tests": [ { "command": "go test ./internal/keria/", "exit_code": 0 }, { "command": "go vet ./internal/keria/", "exit_code": 0 }, { "command": "go test ./internal/controlapi/ ./internal/idp/", "exit_code": 0 }, { "command": "pre-push go-ci gate (build/vet/test/golangci-lint whole tree)", "exit_code": 0 } ], "criteria": { "(story 19, gate half) minted invite token → /boot proceeds and the token is spent (single-use); without a live token /boot is refused": "internal/keria/invite.go BootInvites.CheckBootToken (single-use spend, satisfies controlapi.BootTokenChecker); proven end-to-end through the REAL WithKeriBootGate handler in TestBootGate_KeriaBindingOpensALiveInviteSpendsItRefusesTheRest (204 live → 403 spent/absent/bogus) and unit TestCheckBootToken_LiveOnceThenSpent", "(story 25) issuance/revocation records the transition only after witness receipt; roster survives a redeploy untouched (runtime people, ADR 0105)": "internal/keria/registry.go two-phase escrow: AnchorIssuance/AnchorRevocation record WITHOUT flipping standing, only ConfirmReceipt flips (TestIsIssued_FlipsOnlyAfterWitnessReceipt); roster persisted via jsonstore.File in the control-plane state dir — TestFileRegistry_RosterSurvivesRedeploy re-opens over the same file and finds the member + issued standing intact", "IsIssued flips issued→true / revoked→false and is served to callers (the bridge's contract)": "internal/keria/registry.go Registry.IsIssued (issuer-side, matches idp.Verifier.IsIssued signature; var _ IssuanceOracle assertion); TestIsIssued_FlipsOnlyAfterWitnessReceipt + TestIsIssued_UnknownSAIDReadsFalse + TestRegistry_ReAdmissionIsAFreshIssuance", "the port family's contract tests hold against the keria binding": "var _ controlapi.BootTokenChecker = (*BootInvites)(nil) and the idp.Verifier.IsIssued one-method assertion on *Registry (invite_test.go / registry_test.go), driven through the real /boot forward-auth handler; illegal-transition + idempotency contracts in TestRegistry_RejectsIllegalTransitions and TestJoin_IdempotentDoesNotResetStanding; gated real-packaged-stack smoke TestKeriaStack_Smoke (IDSS_KERIA_SMOKE=1, seedcommunity-eval idiom) probes the #771 doors, skipping cleanly without the stack" }, "summary": "Built the keria adapter's unsigned surface (internal/keria): single-use invite-token mint/spend backing the /boot forward-auth gate, the runtime-people roster, and issuer-side IsIssued recorded only after a two-phase witness-receipt escrow.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
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#775
No description provided.