operator-session: the founded community's own operator is refused at their admin door — the kanidm path never seeds the founder row into the members ledger #1241

Closed
opened 2026-09-05 21:10:50 +00:00 by matou-build-agent · 1 comment

The failure

Drive 20260905T205312Z (target archive, private path, commit 5ca8855a) reds at leg operator-session after founding-prefix went green in 604s. artifacts/legs.json records:

the admin-door sign-in reached neither the dashboard, a login form, nor a consent prompt at
https://admin.e2e-drive.idss.internal/ — the page reads: "YC Operators only The control panel
is for operators. SIGNED IN AS operator WHERE TO GO Your community's services live at the
portal — everything your membership opens is there. Go to your community Sign out"

The door evidence stamped on the same record is {"url":"https://admin.e2e-drive.idss.internal:41715/","status":302} — the front door handed out, the 401 redirect resolved, and the walk completed.

The OIDC walk SUCCEEDED. The page the drive read is not an error page — it is our own DA-S2 refusal surface, rendered by the gate, naming the signed-in identity operator. #1238 (apex NAMES onto :443), #1239 (gate-oidc client on the guest's kanidm) and #1240 (IdP CA beside the system roots) each moved this leg one hop further; this run is the first to mint the community SSO session and reach the gate's decision. The gate then refused the community's own founding operator.

The defect

On the kanidm private path, member.Orchestrator.GateDecision answers the admin pseudo-service straight from the members ledger:

  • internal/member/komiti.go:583-588 — if service == AdminService { if o.isOperator(...) allow; else deny GateReasonOperatorsOnly }
  • internal/member/komiti.go:631-637 — isOperator does o.ledger.Load() → findMember(ls, personID) → ok && m.Role == RoleOperator. An unknown person is not an operator.
  • internal/controlapi/refusal.go:128-136 — refusalOperators renders exactly the copy the drive read (pill "Operators only", where-to-go, portal + sign-out doors).

The session identity is operator, the fixed kanidm account name (internal/clan/vmguest.go:110, OperatorAccount = "operator"; rendered as the declared person at vmguest.go:705, and the founding passkey is minted against it at internal/fleetwire/enrolment.go:243). The harness fills that same name (app/tests/e2e/fixtures/provision.ts:884).

Nothing on the kanidm path ever writes a member row for it. The members ledger is member.NewFileLedger(<stateDir>/members.json) (control-plane/cmd/control-plane/whole_composition.go:617), and a path with no document reads as a zero LedgerState, not an error (internal/member/ledger.go:230-234). Searching the tree, the only production writers of a founder row are:

  • internal/fleetwire/founderroster.go:115-126 — the IDIP founder register (Role: credschema.RoleOperator), POSTed to /api/v1/idip/roster/register; and
  • internal/founding/founderroster.go:49-52, which states it plainly: "On the kanidm path it is never called (no IDIP roster)."

The kanidm founding's own "admin" step is a log line and a view field, nothing more — internal/founding/deploy.go:631-632:

ds.Admin = adminAccount(s.Draft)
log(DeployRowAdmin, "operator admin seeded from declarative config: "+ds.Admin)

(logs/founding-state.log:127-129 shows that row rested done with "admin": "drive@example.nz", having written no ledger.) control-plane/cmd/control-plane/resting_composition.go:261-263 carries the matching TODO: "founding seeds the founder row as runtime data, out of scope for #155" — that seeding was never built for this path.

So: members.json does not exist on the founded guest → Load() → zero state → isOperator("operator") = false → operators-only deny → the DA-S2 surface. The founding operator is locked out of their own control panel by their own gate. This is the kanidm-path twin of the IDIP oidc-admin red that #1018 closed with the founder register.

Layer

Product — founding (internal/founding) and/or the control-plane composition root, not the harness. The drive is doing its job: this is precisely the class of fault it exists to catch, and it caught it on the first run that could see it.

Refusal

Rule 3 — product-behaviour surface. The honest fix is to make founding record the founder as this community's operator on the kanidm path (a founder-row seed, the kanidm analogue of RegisterFounder). That changes what a deploy writes and who the gate admits — a design decision, not a heal. Nothing in the harness, the fixtures or scripts/ can repair it: the Playwright walk signed in correctly as operator and the gate's answer is the product's.

Two shape questions a ruling should settle before a worker starts:

  1. Where the seed happens. A founding leg writing through the control-plane API forward (mirroring internal/fleetwire/founderroster.go, one trust boundary already crossed by the ledger handover), or the control plane seeding at boot from the apex + declared operator account. The IDIP path already has the first shape; symmetry argues for it.
  2. What PersonID the row carries. It MUST be the kanidm account name operator (clan.OperatorAccount) — the join key GateDecision receives as sessionIdentity — and NOT the draft's email drive@example.nz, which is an attribute of that person (internal/clan/vmguest.go:107-110). Seeding the email would render an identical red. Status should be StatusActive, Role RoleOperator (internal/member/ledger.go:17-29).

Also worth the ruling's attention: a founded community whose ledger is empty currently shows an empty members surface too (internal/member/member.go:14-17,42-43 promise "the founder as row one, never empty"), so this one seed closes both the gate refusal and the missing row-one.

No evidence gap in this run beyond logs/guest-files-oidc.log (the journalctl -u 'nextcloud*' -u 'kanidm-provision*' harvest exited 1 with "Failed to add filter for units: No data available" — those units do not exist on this guest yet) and logs/state-logs.log (no state/logs directory). Neither bears on this diagnosis: logs/guest-kanidm.log, logs/guest-control-plane.log and artifacts/ceremony/admin-door-neither-landed.png all show a clean sign-in reaching the gate.

drive 20260905T205312Z red at operator-session: the admin-door sign-in reached neither the dashboard, a login form, nor a consent prompt at https://admin.e2e-drive.idss.internal/ — the page reads: "YC Operators only The control panel is for opera
evidence: /home/swarm/swarm/Matou/idss/test-results/private-path/20260905T205312Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure Drive `20260905T205312Z` (target `archive`, private path, commit `5ca8855a`) reds at leg `operator-session` after `founding-prefix` went green in 604s. `artifacts/legs.json` records: ``` the admin-door sign-in reached neither the dashboard, a login form, nor a consent prompt at https://admin.e2e-drive.idss.internal/ — the page reads: "YC Operators only The control panel is for operators. SIGNED IN AS operator WHERE TO GO Your community's services live at the portal — everything your membership opens is there. Go to your community Sign out" ``` The door evidence stamped on the same record is `{"url":"https://admin.e2e-drive.idss.internal:41715/","status":302}` — the front door handed out, the 401 redirect resolved, and the walk completed. **The OIDC walk SUCCEEDED.** The page the drive read is not an error page — it is our own DA-S2 refusal surface, rendered by the gate, naming the signed-in identity `operator`. #1238 (apex NAMES onto :443), #1239 (gate-oidc client on the guest's kanidm) and #1240 (IdP CA beside the system roots) each moved this leg one hop further; this run is the first to mint the community SSO session and reach the gate's *decision*. The gate then refused the community's own founding operator. ## The defect On the kanidm private path, `member.Orchestrator.GateDecision` answers the `admin` pseudo-service straight from the members ledger: - `internal/member/komiti.go:583-588` — `if service == AdminService { if o.isOperator(...) allow; else deny GateReasonOperatorsOnly }` - `internal/member/komiti.go:631-637` — `isOperator` does `o.ledger.Load()` → `findMember(ls, personID)` → `ok && m.Role == RoleOperator`. **An unknown person is not an operator.** - `internal/controlapi/refusal.go:128-136` — `refusalOperators` renders exactly the copy the drive read (pill "Operators only", `where-to-go`, portal + sign-out doors). The session identity is `operator`, the fixed kanidm account name (`internal/clan/vmguest.go:110`, `OperatorAccount = "operator"`; rendered as the declared person at `vmguest.go:705`, and the founding passkey is minted against it at `internal/fleetwire/enrolment.go:243`). The harness fills that same name (`app/tests/e2e/fixtures/provision.ts:884`). **Nothing on the kanidm path ever writes a member row for it.** The members ledger is `member.NewFileLedger(<stateDir>/members.json)` (`control-plane/cmd/control-plane/whole_composition.go:617`), and a path with no document reads as a zero `LedgerState`, not an error (`internal/member/ledger.go:230-234`). Searching the tree, the only production writers of a founder row are: - `internal/fleetwire/founderroster.go:115-126` — the **IDIP** founder register (`Role: credschema.RoleOperator`), POSTed to `/api/v1/idip/roster/register`; and - `internal/founding/founderroster.go:49-52`, which states it plainly: *"On the kanidm path it is never called (no IDIP roster)."* The kanidm founding's own "admin" step is a log line and a view field, nothing more — `internal/founding/deploy.go:631-632`: ```go ds.Admin = adminAccount(s.Draft) log(DeployRowAdmin, "operator admin seeded from declarative config: "+ds.Admin) ``` (`logs/founding-state.log:127-129` shows that row rested done with `"admin": "drive@example.nz"`, having written no ledger.) `control-plane/cmd/control-plane/resting_composition.go:261-263` carries the matching TODO: *"founding seeds the founder row as runtime data, out of scope for #155"* — that seeding was never built for this path. So: `members.json` does not exist on the founded guest → `Load()` → zero state → `isOperator("operator")` = false → operators-only deny → the DA-S2 surface. **The founding operator is locked out of their own control panel by their own gate.** This is the kanidm-path twin of the IDIP `oidc-admin` red that #1018 closed with the founder register. ## Layer Product — founding (`internal/founding`) and/or the control-plane composition root, not the harness. The drive is doing its job: this is precisely the class of fault it exists to catch, and it caught it on the first run that could see it. ## Refusal **Rule 3 — product-behaviour surface.** The honest fix is to make founding record the founder as this community's operator on the kanidm path (a founder-row seed, the kanidm analogue of `RegisterFounder`). That changes what a deploy writes and who the gate admits — a design decision, not a heal. Nothing in the harness, the fixtures or `scripts/` can repair it: the Playwright walk signed in correctly as `operator` and the gate's answer is the product's. Two shape questions a ruling should settle before a worker starts: 1. **Where the seed happens.** A founding leg writing through the control-plane API forward (mirroring `internal/fleetwire/founderroster.go`, one trust boundary already crossed by the ledger handover), or the control plane seeding at boot from the apex + declared operator account. The IDIP path already has the first shape; symmetry argues for it. 2. **What `PersonID` the row carries.** It MUST be the kanidm account name `operator` (`clan.OperatorAccount`) — the join key `GateDecision` receives as `sessionIdentity` — and NOT the draft's email `drive@example.nz`, which is an attribute of that person (`internal/clan/vmguest.go:107-110`). Seeding the email would render an identical red. `Status` should be `StatusActive`, `Role` `RoleOperator` (`internal/member/ledger.go:17-29`). Also worth the ruling's attention: a founded community whose ledger is empty currently shows an empty members surface too (`internal/member/member.go:14-17,42-43` promise "the founder as row one, never empty"), so this one seed closes both the gate refusal and the missing row-one. No evidence gap in this run beyond `logs/guest-files-oidc.log` (the `journalctl -u 'nextcloud*' -u 'kanidm-provision*'` harvest exited 1 with *"Failed to add filter for units: No data available"* — those units do not exist on this guest yet) and `logs/state-logs.log` (no `state/logs` directory). Neither bears on this diagnosis: `logs/guest-kanidm.log`, `logs/guest-control-plane.log` and `artifacts/ceremony/admin-door-neither-landed.png` all show a clean sign-in reaching the gate. drive `20260905T205312Z` red at `operator-session`: `the admin-door sign-in reached neither the dashboard, a login form, nor a consent prompt at https://admin.e2e-drive.idss.internal/ — the page reads: "YC Operators only The control panel is for opera` evidence: `/home/swarm/swarm/Matou/idss/test-results/private-path/20260905T205312Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: b5659a2277df -->
Owner

Duplicate of #1242 — same run (20260905T205312Z), same diagnosis (the healer's, action file); this copy was stored by Forgejo after the reporter's POST hit a 503, so it never got its blocked-by wiring. The verified diagnosis, the RULING (shape A: idempotent boot-time founder-row seed on the kanidm path) and the build shape live on #1242, which blocks #1235. Closing this one.

Duplicate of #1242 — same run (`20260905T205312Z`), same diagnosis (the healer's, action `file`); this copy was stored by Forgejo after the reporter's POST hit a 503, so it never got its blocked-by wiring. The verified diagnosis, the RULING (shape A: idempotent boot-time founder-row seed on the kanidm path) and the build shape live on #1242, which blocks #1235. Closing this one.
ben closed this issue 2026-09-05 21:21:40 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#1241
No description provided.