founding: the IDIP path still mints a kanidm credential-enrolment token at seeding — the drive reds at activation on a CA pointer that path never bakes #966

Closed
opened 2026-08-28 21:54:16 +00:00 by matou-build-agent · 1 comment

Failure

The #788 IDIP drive (test-results/drive-idip/20260828T214054Z) is green through deploy-takeover (433 s, box live) and reds at leg 11, activation (artifacts/legs.json:53, artifacts/verdict.json — firstRedLeg: activation, commit 7f31601):

activation faulted: founding: mint the credential-enrolment token at seeding:
  fleetwire: read the kanidm trust anchor: fleetwire: ssh: exit status 1 —
  Warning: Identity file .../state/guest-trust/id_ed25519 not accessible: No such file or directory.
cat: /etc/idss/kanidm-ca-path: No such file or directory
cat: '': No such file or directory

SSH connected fine (it fell back to the ambient agent key and ran the command). The command itself failed: the file it reads does not exist on an IDIP gateway.

Evidence

The read. internal/fleetwire/enrolment.go:114-125 (liveCA) runs cat "$(cat /etc/idss/kanidm-ca-path)" over the guest-trust SSH connection; internal/fleetwire/enrolment.go:136 does the same in liveIDP, plus /etc/idss/kanidm-idm-admin-path at :137.

The pointer is deliberately absent on this path. internal/clan/vmguest.go:147 dispatches to renderGatewayGuestIDIP (:213) when GatewayFacts.IdentityIDIP is set, and that render calls gatewaySecretPointersIDIP (internal/clan/vmguest.go:929-935), which emits only the alert-contact /etc files — no idss/kanidm-ca-path, no idss/kanidm-idm-admin-path. Contrast the kanidm-path gatewaySecretPointers at internal/clan/vmguest.go:507-518, which is where those two pointers come from. There is no kanidm on the IDIP gateway at all (DDR 0200 / #778, vmguest.go:199-212), and the run confirms it: logs/droplet-units.txt shows idss-idp on 127.0.0.1:8465 and keria on 3901-3903, with no kanidm listener anywhere.

The caller is ungated. internal/founding/seed.go:279-286:

if o.enrolment != nil {
    tok, err := o.enrolment.MintToken(ctx, adminAccount(s.Draft))

The only condition is "is the face wired". It never consults s.Draft.Identity, even though founding.IdentityIDIP exists (internal/founding/draft.go:136) and s.Draft.Identity is right there in the same call. The state document for this run records draft.identity: "idip" (state/founding-state.json).

The face is wired unconditionally. app/helper/cmd/helper/wiring_prod.go:623-632 always installs founding.WithEnrolment(fleetwire.NewEnrolment(...)) — the kanidm face — regardless of the identity choice.

Gating seeding alone is not enough. internal/founding/handoff.go:427 (MintToken) and :438 (OpenCeremony) call the same kanidm face again at the S12 passkey step. A gate at seed.go:279 only moves the red one leg downstream, into OpenEnrolment.

Suspected layer

internal/founding (the orchestrator's identity-blind hand-off arc), with a consequent wiring question in app/helper/cmd/helper/wiring_prod.go. The clan render layer is correct as-is — it is the founding orchestrator that has not been walked for the IDIP path.

What plugging it needs — this needs a design ruling first

ADR 0199 (docs/adr/0199-idip-v1-surface-rulings-kanidm-tier-walked.md) is the ruling that walked "every kanidm-specific surface" for the IDIP path — credential floor, branded IdP login, files door, gate-oidc provisioning, mail, Netbird auth. Its table has no row for ADR 0046's credential-enrolment token or the S12 passkey ceremony (founding stories 27-32, docs/slices/founding.yaml:76). That surface was missed, and this red is the miss surfacing.

ADR 0195 is the nearest signal that it has no counterpart: "Passkeys — Out for v1: no passkey-wrapped mnemonic; ADR 0170's credential-floor ruling stays kanidm-only" (docs/adr/0195-idip-founder-ceremony-mnemonic-and-rescue-ladder.md:54-57). On the IDIP path the operator's credential is the founder AID + operator membership ACDC minted by the identity legs (docs/slices/idip.yaml:134-158, task #779) — not a kanidm passkey. That strongly suggests the answer is "no token, no ceremony, on this path", but the hand-off's shape without S12 (what S12 renders, what Ceremony/HandOff.Enrolment mean, whether the enrolment face is simply not wired) is a design decision, not a mechanical gate.

Once ruled, the plumbing is roughly:

  1. An ADR 0199 amendment (or a new row) ruling the ADR 0046 credential-enrolment surface for IDIP.
  2. Gate internal/founding/seed.go:279 on s.Draft.Identity != IdentityIDIP (or on the presence of an identity-appropriate enrolment face).
  3. Gate/replace internal/founding/handoff.go:409-445 (OpenEnrolment) for the same path — otherwise the red simply reappears one leg later.
  4. Decide whether wiring_prod.go:623 should stop wiring the kanidm face when the draft is IDIP, so the port stays nil and founding fails loud honestly per ADR 0100 rather than SSHing at a file that cannot exist.
  5. A go test ./internal/founding/ seam test that drives a seed + hand-off with Draft.Identity = IdentityIDIP and asserts the kanidm enrolment face is never called — the regression this drive paid a droplet to find.

Second, distinct fault on the same screen — do not lose it

The activation screenshot (artifacts/legs/activation.png) and page snapshot (artifacts/journey.idip-.../error-context.md, page-snapshot ref=f1e55-f1e70) show the founder-AID identity row failed independently of the fault above:

✕ Your identity — created from your recovery phrase   (founder AID)
THIS STEP DIDN'T FINISH — Your identity — created from your recovery phrase
agent does not exist for controller EBxTzpAJxdo3OMG5DTC9TUwDYJWgnwhpdzeVTE4K-L71

The row above it is green (✓ Identity service — KERIA + witness + sign-in door live (door probe passed)), and the box agrees: KERIA started clean at 21:46:57 (logs/droplet-journal.txt:595,728) and its boot/admin/agent ports 3901/3902/3903 are listening (logs/droplet-units.txt). So the stack is up and the renderer's signify-ts client never completed KERIA's boot for that controller — it asked for an agent that was never created, or booted against a different KERIA/passcode than the one it then connected with. That is task #779 (idip:founding-identity-legs), and it is the very thing leg 12a (identity-rows, journey.idip.spec.ts:483-487) exists to check — a leg this drive never reached. Whoever fixes the enrolment-token gate above will re-fire straight into this one unless it is fixed in the same arc.

Two smaller things worth naming (neither is the red)

  • The enrolment face's SSH identity is wrong for this path. wiring_prod.go:624 keys the enrolment adapter on guestTrustDir()/id_ed25519 = <state>/guest-trust/id_ed25519, which this self-hosted journey never mints — the run's state/ carries own-vps/ holding known_hosts and known_hosts.old only, and no guest-trust/ directory at all. Every enrolment SSH on the self-hosted path is therefore silently falling back to the ambient agent key. It worked here by luck; it is not a contract.
  • The error line is dishonest about what failed. cat "$(cat /etc/idss/kanidm-ca-path)" (enrolment.go:120, :136) swallows the inner cat's exit and then runs cat "", so the operator-facing fault carries a baffling cat: '': No such file or directory beside the real cause. A guard (p=$(cat …) || exit; cat "$p") would name the missing pointer once, cleanly.

drive 20260828T214054Z red at activation: activation faulted: founding: mint the credential-enrolment token at seeding: fleetwire: read the kanidm trust anchor: fleetwire: ssh: exit status 1 — Warning: Identity file /home/dev/swarm/Matou/id
evidence: /home/dev/swarm/Matou/idss/test-results/drive-idip/20260828T214054Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure The `#788` IDIP drive (`test-results/drive-idip/20260828T214054Z`) is green through `deploy-takeover` (433 s, box live) and reds at leg 11, `activation` (`artifacts/legs.json:53`, `artifacts/verdict.json` — `firstRedLeg: activation`, commit `7f31601`): ``` activation faulted: founding: mint the credential-enrolment token at seeding: fleetwire: read the kanidm trust anchor: fleetwire: ssh: exit status 1 — Warning: Identity file .../state/guest-trust/id_ed25519 not accessible: No such file or directory. cat: /etc/idss/kanidm-ca-path: No such file or directory cat: '': No such file or directory ``` SSH connected fine (it fell back to the ambient agent key and ran the command). The command itself failed: the file it reads does not exist on an IDIP gateway. ## Evidence **The read.** `internal/fleetwire/enrolment.go:114-125` (`liveCA`) runs `cat "$(cat /etc/idss/kanidm-ca-path)"` over the guest-trust SSH connection; `internal/fleetwire/enrolment.go:136` does the same in `liveIDP`, plus `/etc/idss/kanidm-idm-admin-path` at `:137`. **The pointer is deliberately absent on this path.** `internal/clan/vmguest.go:147` dispatches to `renderGatewayGuestIDIP` (`:213`) when `GatewayFacts.IdentityIDIP` is set, and that render calls `gatewaySecretPointersIDIP` (`internal/clan/vmguest.go:929-935`), which emits *only* the alert-contact `/etc` files — no `idss/kanidm-ca-path`, no `idss/kanidm-idm-admin-path`. Contrast the kanidm-path `gatewaySecretPointers` at `internal/clan/vmguest.go:507-518`, which is where those two pointers come from. There is no kanidm on the IDIP gateway at all (DDR 0200 / #778, `vmguest.go:199-212`), and the run confirms it: `logs/droplet-units.txt` shows `idss-idp` on `127.0.0.1:8465` and keria on `3901-3903`, with no kanidm listener anywhere. **The caller is ungated.** `internal/founding/seed.go:279-286`: ```go if o.enrolment != nil { tok, err := o.enrolment.MintToken(ctx, adminAccount(s.Draft)) ``` The only condition is "is the face wired". It never consults `s.Draft.Identity`, even though `founding.IdentityIDIP` exists (`internal/founding/draft.go:136`) and `s.Draft.Identity` is right there in the same call. The state document for this run records `draft.identity: "idip"` (`state/founding-state.json`). **The face is wired unconditionally.** `app/helper/cmd/helper/wiring_prod.go:623-632` always installs `founding.WithEnrolment(fleetwire.NewEnrolment(...))` — the kanidm face — regardless of the identity choice. **Gating seeding alone is not enough.** `internal/founding/handoff.go:427` (`MintToken`) and `:438` (`OpenCeremony`) call the same kanidm face again at the S12 passkey step. A gate at `seed.go:279` only moves the red one leg downstream, into `OpenEnrolment`. ## Suspected layer `internal/founding` (the orchestrator's identity-blind hand-off arc), with a consequent wiring question in `app/helper/cmd/helper/wiring_prod.go`. The clan render layer is correct as-is — it is the founding orchestrator that has not been walked for the IDIP path. ## What plugging it needs — this needs a design ruling first ADR 0199 (`docs/adr/0199-idip-v1-surface-rulings-kanidm-tier-walked.md`) is the ruling that walked "every kanidm-specific surface" for the IDIP path — credential floor, branded IdP login, files door, `gate-oidc` provisioning, mail, Netbird auth. **Its table has no row for ADR 0046's credential-enrolment token or the S12 passkey ceremony** (founding stories 27-32, `docs/slices/founding.yaml:76`). That surface was missed, and this red is the miss surfacing. ADR 0195 is the nearest signal that it has no counterpart: "Passkeys — Out for v1: no passkey-wrapped mnemonic; ADR 0170's credential-floor ruling stays kanidm-only" (`docs/adr/0195-idip-founder-ceremony-mnemonic-and-rescue-ladder.md:54-57`). On the IDIP path the operator's credential is the founder AID + operator membership ACDC minted by the identity legs (`docs/slices/idip.yaml:134-158`, task #779) — not a kanidm passkey. That strongly suggests the answer is "no token, no ceremony, on this path", but the hand-off's shape without S12 (what S12 renders, what `Ceremony`/`HandOff.Enrolment` mean, whether the enrolment face is simply not wired) is a design decision, not a mechanical gate. Once ruled, the plumbing is roughly: 1. An ADR 0199 amendment (or a new row) ruling the ADR 0046 credential-enrolment surface for IDIP. 2. Gate `internal/founding/seed.go:279` on `s.Draft.Identity != IdentityIDIP` (or on the presence of an identity-appropriate enrolment face). 3. Gate/replace `internal/founding/handoff.go:409-445` (`OpenEnrolment`) for the same path — otherwise the red simply reappears one leg later. 4. Decide whether `wiring_prod.go:623` should stop wiring the kanidm face when the draft is IDIP, so the port stays nil and founding fails loud honestly per ADR 0100 rather than SSHing at a file that cannot exist. 5. A `go test ./internal/founding/` seam test that drives a seed + hand-off with `Draft.Identity = IdentityIDIP` and asserts the kanidm enrolment face is never called — the regression this drive paid a droplet to find. ## Second, distinct fault on the same screen — do not lose it The activation screenshot (`artifacts/legs/activation.png`) and page snapshot (`artifacts/journey.idip-.../error-context.md`, page-snapshot `ref=f1e55-f1e70`) show the **founder-AID identity row failed independently** of the fault above: ``` ✕ Your identity — created from your recovery phrase (founder AID) THIS STEP DIDN'T FINISH — Your identity — created from your recovery phrase agent does not exist for controller EBxTzpAJxdo3OMG5DTC9TUwDYJWgnwhpdzeVTE4K-L71 ``` The row above it is green (`✓ Identity service — KERIA + witness + sign-in door live (door probe passed)`), and the box agrees: KERIA started clean at 21:46:57 (`logs/droplet-journal.txt:595,728`) and its boot/admin/agent ports 3901/3902/3903 are listening (`logs/droplet-units.txt`). So the stack is up and the renderer's signify-ts client never completed KERIA's `boot` for that controller — it asked for an agent that was never created, or booted against a different KERIA/passcode than the one it then connected with. That is task #779 (`idip:founding-identity-legs`), and it is the very thing leg 12a (`identity-rows`, `journey.idip.spec.ts:483-487`) exists to check — a leg this drive never reached. Whoever fixes the enrolment-token gate above will re-fire straight into this one unless it is fixed in the same arc. ## Two smaller things worth naming (neither is the red) - **The enrolment face's SSH identity is wrong for this path.** `wiring_prod.go:624` keys the enrolment adapter on `guestTrustDir()/id_ed25519` = `<state>/guest-trust/id_ed25519`, which this self-hosted journey never mints — the run's `state/` carries `own-vps/` holding `known_hosts` and `known_hosts.old` only, and no `guest-trust/` directory at all. Every enrolment SSH on the self-hosted path is therefore silently falling back to the ambient agent key. It worked here by luck; it is not a contract. - **The error line is dishonest about what failed.** `cat "$(cat /etc/idss/kanidm-ca-path)"` (`enrolment.go:120`, `:136`) swallows the inner `cat`'s exit and then runs `cat ""`, so the operator-facing fault carries a baffling `cat: '': No such file or directory` beside the real cause. A guard (`p=$(cat …) || exit; cat "$p"`) would name the missing pointer once, cleanly. drive `20260828T214054Z` red at `activation`: `activation faulted: founding: mint the credential-enrolment token at seeding: fleetwire: read the kanidm trust anchor: fleetwire: ssh: exit status 1 — Warning: Identity file /home/dev/swarm/Matou/id` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-idip/20260828T214054Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 4c82deb1e678 -->
Author
Member

Ruled by agent under ADR 0174 — veto anytime.

The ruling (design-tier, two-way door)

ADR 0199 walked "every kanidm-specific surface" for the IDIP path but had no
row for ADR 0046's credential-enrolment token or the S12 passkey ceremony
— the
miss this drive surfaced. New ADR 0215 rules that row: N/A for IDIP. On
the IDIP path the operator's person credential is the founder AID +
operator-membership ACDC the identity legs mint (ADRs 0197/0198/0200), so there
is no token to mint at seeding and no ceremony to carry one — consistent with ADR
0195 (passkeys out for v1; the credential floor stays kanidm-only). This is the
ticket's proposed default, adopted.

Why a two-way door: ADR 0174 rule 1 puts design-tier accepts (DDRs) inside
the agent's authority; the change is revertible with a commit and provable by an
offline seam test; it widens no security posture, spends nothing, and touches no
one-way door.

What landed — commit dd1e56ec

  • ADR 0215 (docs/adr/0215-idip-credential-enrolment-surface-has-no-counterpart.md) — rules the missing ADR 0199 row.
  • internal/founding/seed.go — seeding mints nothing on IDIP (the red at seed.go:280) and logs why, gated on s.Draft.Identity via a new mintsEnrolmentToken predicate.
  • internal/founding/handoff.go — OpenEnrolment/AwaitEnrolment fail loud with ErrEnrolmentNotOnIDIP on IDIP rather than SSH at an absent kanidm (ADR 0100); BeginHandOff no longer advertises the kanidm branded enrolment screen on IDIP. The enrolment face stays wired identity-blind (wiring_prod.go) — the orchestrator gates, since it is the layer that knows the identity choice.
  • docs/architecture/09-founding-sequence.md — derived-view note that the token mint is kanidm-path-only (ADR 0042).
  • STATUS.md — new lead, same commit.

Proof

Red-first, entirely offline: TestIDIP_KanidmEnrolmentFaceNeverCalled
(internal/founding/handoff_test.go) drives seed + hand-off with
Draft.Identity = IdentityIDIP and asserts the kanidm face is never minted
against
(Minted == 0) and both ceremony ops fail loud. Compile-red before the
ErrEnrolmentNotOnIDIP sentinel + gates existed; green after.
go build(+-tags dev)/vet/go test ./internal/founding all green.

Named residue — filed, deliberately NOT pulled into this ticket (ADR 0174 rule 1)

  • #968 — the drive now re-fires into the #779 regression at leg 12a identity-rows ("agent does not exist for controller …", a signify-ts/KERIA renderer boot fault). This is why the #788 drive is not yet fully green — it is a distinct bug in a distinct layer, not #966.
  • #969 — two founding-enrolment hygiene items (the adapter's wrong SSH identity on the self-hosted path; the dishonest cat '' error line).
  • #970 — the IDIP S12 hand-off render + completion design surface (FoundingHandOff.vue's kanidm passkey CTA; maybeFinish gated on enrolment.registered, which never completes on IDIP).

Closing: the enrolment-token red this ticket names is fixed and proven. The
drive's next red (identity-rows) is a separate, filed regression (#968).

**Ruled by agent under ADR 0174 — veto anytime.** ## The ruling (design-tier, two-way door) ADR 0199 walked "every kanidm-specific surface" for the IDIP path but had **no row for ADR 0046's credential-enrolment token or the S12 passkey ceremony** — the miss this drive surfaced. New **ADR 0215** rules that row: **N/A for IDIP.** On the IDIP path the operator's person credential is the founder AID + operator-membership ACDC the identity legs mint (ADRs 0197/0198/0200), so there is no token to mint at seeding and no ceremony to carry one — consistent with ADR 0195 (passkeys out for v1; the credential floor stays kanidm-only). This is the ticket's proposed default, adopted. **Why a two-way door:** ADR 0174 rule 1 puts *design-tier accepts (DDRs)* inside the agent's authority; the change is revertible with a commit and provable by an offline seam test; it widens no security posture, spends nothing, and touches no one-way door. ## What landed — commit `dd1e56ec` - **ADR 0215** (`docs/adr/0215-idip-credential-enrolment-surface-has-no-counterpart.md`) — rules the missing ADR 0199 row. - **`internal/founding/seed.go`** — seeding mints nothing on IDIP (the red at `seed.go:280`) and logs why, gated on `s.Draft.Identity` via a new `mintsEnrolmentToken` predicate. - **`internal/founding/handoff.go`** — `OpenEnrolment`/`AwaitEnrolment` fail loud with `ErrEnrolmentNotOnIDIP` on IDIP rather than SSH at an absent kanidm (ADR 0100); `BeginHandOff` no longer advertises the kanidm branded enrolment screen on IDIP. The enrolment face stays wired identity-blind (`wiring_prod.go`) — the orchestrator gates, since it is the layer that knows the identity choice. - **`docs/architecture/09-founding-sequence.md`** — derived-view note that the token mint is kanidm-path-only (ADR 0042). - **`STATUS.md`** — new lead, same commit. ## Proof Red-first, entirely offline: `TestIDIP_KanidmEnrolmentFaceNeverCalled` (`internal/founding/handoff_test.go`) drives seed + hand-off with `Draft.Identity = IdentityIDIP` and asserts the kanidm face is **never minted against** (`Minted == 0`) and both ceremony ops fail loud. Compile-red before the `ErrEnrolmentNotOnIDIP` sentinel + gates existed; green after. `go build`(+`-tags dev`)/`vet`/`go test ./internal/founding` all green. ## Named residue — filed, deliberately NOT pulled into this ticket (ADR 0174 rule 1) - **#968** — the drive now re-fires into the **#779 regression** at leg 12a `identity-rows` ("agent does not exist for controller …", a signify-ts/KERIA renderer boot fault). This is why the #788 drive is **not yet fully green** — it is a distinct bug in a distinct layer, not #966. - **#969** — two founding-enrolment hygiene items (the adapter's wrong SSH identity on the self-hosted path; the dishonest `cat ''` error line). - **#970** — the IDIP S12 hand-off render + completion design surface (`FoundingHandOff.vue`'s kanidm passkey CTA; `maybeFinish` gated on `enrolment.registered`, which never completes on IDIP). Closing: the enrolment-token red this ticket names is fixed and proven. The drive's next red (identity-rows) is a separate, filed regression (#968).
matou-build-agent 2026-08-28 22:14: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#966
No description provided.