idip: seed-leg-idip — the IDIP seed leg provisions the identity stack instead of kanidm #778

Closed
opened 2026-08-25 04:27:05 +00:00 by ben · 3 comments
Owner

Parent

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

What to build

The conditional seed leg (DDR 0200, ADR 0199): when IDIP was chosen at S3a, whichever carrier journey runs (rented S7, own-VPS S7a, at-your-place S7b, private VAR) provisions KERIA + witness + schema server + idss-idp instead of the kanidm block — carrier legs otherwise unchanged — with the bridge's OIDC clients (the gate client, catalogue services, Netbird) declared in Nix exactly as the kanidm path declares its own. The identity doors must be TLS-live behind the front door before any identity leg runs: the identity work is sequenced after the carrier's door probe.

Acceptance criteria

  • (story 8) Given IDIP chosen and Create fired, when the seed leg renders the config repo, then the IDIP services are declared (each with its declared health check) and no kanidm; given kanidm chosen, then the render is byte-identical to today.
  • (story 8) Given the deployed gateway, when the door probe passes, then the KERIA doors and id. answer over TLS — the precondition the identity legs sequence behind.
  • Given the OIDC clients, when the seed leg lands, then the auth gate and catalogue clients are declared against id. with PKCE, kanidm's slot semantics intact.

Blocked by

  • #771 — idip:keri-stack-nix
  • #774 — idip:founding-s3a-identity
  • founding:deploy-gateway (#57) (done — satisfied)

Task manifest

task: idip:seed-leg-idip
implements_flow: p1-founding
implements_edge: S6a→S7 (seed-leg portion)
interface: 'the founding deploy path branches on the recorded identity choice: IDIP ⇒ render/provision
  the identity stack + idss-idp + its OIDC clients in place of the kanidm block; identity legs sequenced
  after the door probe'
seam: config-repo render tests (IDIP ⇒ stack + clients, no kanidm; kanidm ⇒ byte-identical render) + a
  lab deploy proving doors TLS-live before identity legs are permitted
acceptance:
- given: IDIP chosen
  when: the seed leg renders
  then: identity stack + idss-idp + OIDC clients declared, no kanidm
- given: kanidm chosen
  when: the seed leg renders
  then: byte-identical to today
- given: the deployed gateway
  when: door probe passes
  then: identity doors TLS-live — the identity-legs precondition
depends_on:
- keri-stack-nix
- founding-s3a-identity
- founding:deploy-gateway
out_of_scope:
- the renderer identity legs and rows — founding-identity-legs
- the stack packaging itself — keri-stack-nix
needs_human_decision: []
## Parent Feature spec: #767 (idip; wayfinder map #725). ## What to build The conditional seed leg (DDR 0200, ADR 0199): when IDIP was chosen at S3a, whichever carrier journey runs (rented S7, own-VPS S7a, at-your-place S7b, private VAR) provisions KERIA + witness + schema server + idss-idp instead of the kanidm block — carrier legs otherwise unchanged — with the bridge's OIDC clients (the gate client, catalogue services, Netbird) declared in Nix exactly as the kanidm path declares its own. The identity doors must be TLS-live behind the front door before any identity leg runs: the identity work is sequenced after the carrier's door probe. ## Acceptance criteria - [ ] (story 8) Given IDIP chosen and Create fired, when the seed leg renders the config repo, then the IDIP services are declared (each with its declared health check) and no kanidm; given kanidm chosen, then the render is byte-identical to today. - [ ] (story 8) Given the deployed gateway, when the door probe passes, then the KERIA doors and id.<apex> answer over TLS — the precondition the identity legs sequence behind. - [ ] Given the OIDC clients, when the seed leg lands, then the auth gate and catalogue clients are declared against id.<apex> with PKCE, kanidm's slot semantics intact. ## Blocked by - #771 — idip:keri-stack-nix - #774 — idip:founding-s3a-identity - founding:deploy-gateway (#57) (done — satisfied) ## Task manifest ```yaml task: idip:seed-leg-idip implements_flow: p1-founding implements_edge: S6a→S7 (seed-leg portion) interface: 'the founding deploy path branches on the recorded identity choice: IDIP ⇒ render/provision the identity stack + idss-idp + its OIDC clients in place of the kanidm block; identity legs sequenced after the door probe' seam: config-repo render tests (IDIP ⇒ stack + clients, no kanidm; kanidm ⇒ byte-identical render) + a lab deploy proving doors TLS-live before identity legs are permitted acceptance: - given: IDIP chosen when: the seed leg renders then: identity stack + idss-idp + OIDC clients declared, no kanidm - given: kanidm chosen when: the seed leg renders then: byte-identical to today - given: the deployed gateway when: door probe passes then: identity doors TLS-live — the identity-legs precondition depends_on: - keri-stack-nix - founding-s3a-identity - founding:deploy-gateway out_of_scope: - the renderer identity legs and rows — founding-identity-legs - the stack packaging itself — keri-stack-nix needs_human_decision: [] ```

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

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

Ruled by agent under ADR 0174 — veto anytime.

Scope boundary for the seed-leg render branch (all two-way doors, revertible by a later commit, provable by the config-repo render tests this slice ships):

  1. The idss-idp unit references a not-yet-built binary at the seeded path /srv/idss/bin/idss-idp (mirroring control-plane's /srv/idss/bin/control-plane), rather than building the ADR 0196 Go bridge here. This parallels #771's discipline (the KERI stack renders with fakeHash placeholders; the live nix build rode the founding drive). The bridge binary + its packaging is the ADR 0196 idss-idp ticket; the live door probe / TLS-live proof rides the founding drive, exactly as #771's stack build did. Why two-way: the seeded path is one edit to change; nothing ships to a real box on the IDIP path yet (no binary), and the render evaluates.

  2. On the IDIP path the control-plane unit drops the IDSS_KANIDM_* exports and does not wire a runtime identity adapter (the keria adapter is founding-identity-legs, explicitly out_of_scope here) — it exports IDSS_IDP_URL (the loopback bridge) and otherwise rests honestly (ADR 0100). Why two-way: purely additive env; revertible, and the kanidm path is byte-identical (the whole branch is gated behind IdentityIDIP, default false).

  3. The founding-declared OIDC clients are the gate client, the files (catalogue) client and Netbird, each PKCE S256 with redirect URIs derived from the apex, declared in Nix as idss-idp's clients config — the parallel to kanidm's gate-oidc slot. Per-service catalogue clients that attach at runtime ride their own attach step, as they do on kanidm.

Proven by: internal/clan render tests — IDIP ⇒ keri-stack + idss-idp + clients, no kanidm; kanidm ⇒ byte-identical render (the determinism/baseline anchors stay green).

**Ruled by agent under ADR 0174 — veto anytime.** Scope boundary for the seed-leg render branch (all two-way doors, revertible by a later commit, provable by the config-repo render tests this slice ships): 1. **The `idss-idp` unit references a not-yet-built binary at the seeded path `/srv/idss/bin/idss-idp`** (mirroring `control-plane`'s `/srv/idss/bin/control-plane`), rather than building the ADR 0196 Go bridge here. This parallels #771's discipline (the KERI stack renders with `fakeHash` placeholders; the live `nix build` rode the founding drive). The bridge binary + its packaging is the ADR 0196 `idss-idp` ticket; the live door probe / TLS-live proof rides the founding drive, exactly as #771's stack build did. *Why two-way:* the seeded path is one edit to change; nothing ships to a real box on the IDIP path yet (no binary), and the render evaluates. 2. **On the IDIP path the control-plane unit drops the `IDSS_KANIDM_*` exports and does not wire a runtime identity adapter** (the keria adapter is `founding-identity-legs`, explicitly `out_of_scope` here) — it exports `IDSS_IDP_URL` (the loopback bridge) and otherwise rests honestly (ADR 0100). *Why two-way:* purely additive env; revertible, and the kanidm path is byte-identical (the whole branch is gated behind `IdentityIDIP`, default false). 3. **The founding-declared OIDC clients are the gate client, the files (catalogue) client and Netbird**, each PKCE S256 with redirect URIs derived from the apex, declared in Nix as `idss-idp`'s clients config — the parallel to kanidm's `gate-oidc` slot. Per-service catalogue clients that attach at runtime ride their own attach step, as they do on kanidm. Proven by: `internal/clan` render tests — IDIP ⇒ keri-stack + idss-idp + clients, no kanidm; kanidm ⇒ byte-identical render (the determinism/baseline anchors stay green).

close-report for #778 — status success

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

envelope
{
  "issue": 778,
  "status": "success",
  "commits": [
    "4b5500e52508df6fa5497e98d7f2cadfc4b0b810"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/clan.go",
    "internal/clan/enrollment.go",
    "internal/clan/frontdoor.go",
    "internal/clan/frontdoor_attach.go",
    "internal/clan/gateway_attach.go",
    "internal/clan/idssidp.go",
    "internal/clan/idssidp_test.go",
    "internal/clan/seedleg_idip_test.go",
    "internal/clan/vmguest.go",
    "internal/founding/identity_seedleg_test.go",
    "internal/founding/privatepath.go",
    "internal/founding/selfhostedpath.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/... ./internal/founding/...",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./... && golangci-lint run ./...",
      "exit_code": 0
    },
    {
      "command": "go test ./... (full module + broker, via the push gate GATE_GO_CMD)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "story 8 — IDIP chosen + Create fired: seed leg renders IDIP services each with its declared health check and no kanidm": "RenderKeri (keri-stack.nix, 3 units w/ health checks, #771) + new RenderIdssIdp (idss-idp.nix, unit w/ /healthz ExecStartPost, ADR 0112) written by writeGatewayIdentityModules on the IDIP path; renderGatewayGuest/renderControlPlaneSurface IDIP variants drop every kanidm block; asserted by TestSeedLeg_IDIP{GatewayGuest,ControlPlaneSurface}DeclaresNoKanidm + TestRenderIdssIdp_UnitHasDeclaredHealthCheck (internal/clan/{seedleg_idip_test.go,idssidp_test.go})",
    "story 8 — kanidm chosen: render byte-identical to today": "IdentityIDIP defaults false; keri-stack.nix/idss-idp.nix imported via presentModules only when written, so the kanidm configuration.nix + every gateway/front-door render is unchanged — every pre-existing internal/clan render/determinism test stays green; TestSeedLeg_ConfigurationImportsIdentityModulesOnlyWhenPresent pins the import list",
    "story 8 — deployed gateway: door probe passes ⇒ KERIA doors and id.<apex> answer over TLS (identity-legs precondition)": "front door fronts the KERI doors (FrontDoorConfig.Keri) and proxies id.<apex> to the idss-idp bridge on both public and private paths (TestSeedLeg_IDIPFrontDoorProxiesBridgeFrontsKeriNoKanidm / TestSeedLeg_IDIPPrivateFrontDoorProxiesBridgeFrontsKeri); the live TLS door probe rides the founding drive per the slice-map ruling (as #771's stack build did), ruled on #778 under ADR 0174",
    "OIDC clients: auth gate + catalogue clients declared against id.<apex> with PKCE, kanidm slot semantics intact": "RenderIdssIdp declares the gate-oidc, files (DDR 0158) and netbird (ADR 0039) clients at issuer https://id.<apex> with pkce=S256 for every client (TestRenderIdssIdp_ClientsAtIDPWithPKCE); the gate-oidc client secret rides the same GateOIDCGenerator name the kanidm path uses so the control-plane export resolves it either way (kanidm's slot semantics intact)"
  },
  "summary": "The founding gateway render now branches on the recorded S3a identity choice: IDIP provisions the KERI stack + the idss-idp OIDC bridge + its PKCE clients in place of the kanidm block with no kanidm, and kanidm renders byte-identical.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #778 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 778, "status": "success", "commits": [ "4b5500e52508df6fa5497e98d7f2cadfc4b0b810" ], "changed_files": [ "STATUS.md", "internal/clan/clan.go", "internal/clan/enrollment.go", "internal/clan/frontdoor.go", "internal/clan/frontdoor_attach.go", "internal/clan/gateway_attach.go", "internal/clan/idssidp.go", "internal/clan/idssidp_test.go", "internal/clan/seedleg_idip_test.go", "internal/clan/vmguest.go", "internal/founding/identity_seedleg_test.go", "internal/founding/privatepath.go", "internal/founding/selfhostedpath.go" ], "tests": [ { "command": "go test ./internal/clan/... ./internal/founding/...", "exit_code": 0 }, { "command": "go build ./... && go vet ./... && golangci-lint run ./...", "exit_code": 0 }, { "command": "go test ./... (full module + broker, via the push gate GATE_GO_CMD)", "exit_code": 0 } ], "criteria": { "story 8 — IDIP chosen + Create fired: seed leg renders IDIP services each with its declared health check and no kanidm": "RenderKeri (keri-stack.nix, 3 units w/ health checks, #771) + new RenderIdssIdp (idss-idp.nix, unit w/ /healthz ExecStartPost, ADR 0112) written by writeGatewayIdentityModules on the IDIP path; renderGatewayGuest/renderControlPlaneSurface IDIP variants drop every kanidm block; asserted by TestSeedLeg_IDIP{GatewayGuest,ControlPlaneSurface}DeclaresNoKanidm + TestRenderIdssIdp_UnitHasDeclaredHealthCheck (internal/clan/{seedleg_idip_test.go,idssidp_test.go})", "story 8 — kanidm chosen: render byte-identical to today": "IdentityIDIP defaults false; keri-stack.nix/idss-idp.nix imported via presentModules only when written, so the kanidm configuration.nix + every gateway/front-door render is unchanged — every pre-existing internal/clan render/determinism test stays green; TestSeedLeg_ConfigurationImportsIdentityModulesOnlyWhenPresent pins the import list", "story 8 — deployed gateway: door probe passes ⇒ KERIA doors and id.<apex> answer over TLS (identity-legs precondition)": "front door fronts the KERI doors (FrontDoorConfig.Keri) and proxies id.<apex> to the idss-idp bridge on both public and private paths (TestSeedLeg_IDIPFrontDoorProxiesBridgeFrontsKeriNoKanidm / TestSeedLeg_IDIPPrivateFrontDoorProxiesBridgeFrontsKeri); the live TLS door probe rides the founding drive per the slice-map ruling (as #771's stack build did), ruled on #778 under ADR 0174", "OIDC clients: auth gate + catalogue clients declared against id.<apex> with PKCE, kanidm slot semantics intact": "RenderIdssIdp declares the gate-oidc, files (DDR 0158) and netbird (ADR 0039) clients at issuer https://id.<apex> with pkce=S256 for every client (TestRenderIdssIdp_ClientsAtIDPWithPKCE); the gate-oidc client secret rides the same GateOIDCGenerator name the kanidm path uses so the control-plane export resolves it either way (kanidm's slot semantics intact)" }, "summary": "The founding gateway render now branches on the recorded S3a identity choice: IDIP provisions the KERI stack + the idss-idp OIDC bridge + its PKCE clients in place of the kanidm block with no kanidm, and kanidm renders byte-identical.", "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#778
No description provided.