members: a member has no email-shaped identity — Grist refuses the per-person grant and Listmonk refuses the operator pre-provision (run 12 red at redeploy-services, #1547) #1580

Closed
opened 2026-09-18 14:32:34 +00:00 by ben · 4 comments
Owner

What happened

Run 12 of the #1547 roles proof (20260918T135205Z, commit a3977df1) went red at redeploy-services, 29 of 30 legs green:

role posture not honest on 2 door(s) — proof-operator's role on data-collections reads "not yet applied" (org owner) | proof-operator's role on newsletters reads "not yet applied" (Super Admin)

Both reds have one cause: a member has no email address anywhere in IDSS, and two services key a person by email.

Evidence, read from the kept box 170.64.164.213 (read-only)

Grist (data-collections). The per-person org grant ruled on #1575 is refused for every member. Control-plane journal:

data-collections org access refused person=proof-member   role=editors status=400 reason="Grist said: {"error":"Invalid email address included"}"
data-collections org access refused person=proof-operator role=owners  status=400 reason="Grist said: {"error":"Invalid email address included"}"

Grist's access API only accepts an email-shaped key. The product sends the bare kanidm username. The founding operator only works because Grist claims GRIST_DEFAULT_EMAIL=operator at first boot, which skips that validation. Org access on the box lists operator (owners) and the health fixture only.

Listmonk (newsletters). provisionOperator posts {username, type, user_role_id, password_login} with no email and no name. Listmonk's users table on the box holds only idss-admin and idss-api, so the pre-provision failed. The refusal reason was not captured: ReconcileRole's error is never logged. Listmonk 6.1.0 validates email and name on create-user.

Not yet seen, same cause. Listmonk's OIDC sign-in matches and auto-creates accounts by the email claim. internal/kanidm never sets mail on a person, so kanidm sends no email claim. A member's first sign-in to newsletters is likely to fail too. The door legs have never run, so this is unproven.

The decision

What email-shaped identity does a member wear in a service that keys people by email?

The #1535 ruling says X-Idss-Identity is the kanidm username, and the glossary says identity lives in the IdP, not the mailbox. Neither answers this.

The glossary already defines this under Mailbox: a member's fixed address, never reissued to another person. Use it as the email-shaped identity whether or not the Mailbox has been claimed.

  • kanidm: set it as the person's mail at create, and backfill existing persons. The OIDC email claim then carries it, so Listmonk matches its pre-provisioned account.
  • Auth gate: emit it as a second header (X-Idss-Email) beside X-Idss-Identity. X-Idss-Identity stays the kanidm username, so the #1535 ruling is untouched.
  • Grist: read X-Idss-Email as its forward-auth header. GRIST_DEFAULT_EMAIL, the row-level rule, the health keys and the per-person grant all use the address.
  • Listmonk: provisionOperator sends the address as email and the display name as name.
  • Cost: the address receives no mail until the member claims their Mailbox, so anything a service sends there bounces. No port relies on a service emailing a member today.
  • Cost: Grist accounts already keyed by a bare username are orphaned. Only whakatohea-demo has any.

Option 2: ask for a real email when a member is added

This is a new required field in add-member and invite, and a change to the members flow and wireframes (needs-design). It ties a member's identity to an outside mailbox, which the glossary avoids. It is the larger change and blocks #1547 longer.

Not viable: grant at first sign-in instead

Grist creates a first-sign-in account keyed by the bare username, and its API still refuses to grant to that key.

Also owed, whichever option is ruled

  • newslettersvc captures Listmonk's refusal body and logs the reconcile error, as f541461c did for Grist (GOTCHAS #245).
  • A GOTCHAS.md entry: services that key people by email, and what they do with a bare username.

Acceptance

  • Ruling recorded as an ADR amending the #1535 identity ruling.
  • On a fresh rented-services drive, proof-member and proof-operator read as applied on data-collections and newsletters after redeploy-services.
  • Grist org access lists both people at the ruled roles. Listmonk users holds proof-operator at Super Admin.
  • A member's first OIDC sign-in to newsletters lands on the pre-provisioned account, not a second one.
## What happened Run 12 of the #1547 roles proof (`20260918T135205Z`, commit `a3977df1`) went red at `redeploy-services`, 29 of 30 legs green: > role posture not honest on 2 door(s) — proof-operator's role on data-collections reads "not yet applied" (org owner) | proof-operator's role on newsletters reads "not yet applied" (Super Admin) Both reds have one cause: **a member has no email address anywhere in IDSS, and two services key a person by email.** ## Evidence, read from the kept box `170.64.164.213` (read-only) **Grist (data-collections).** The per-person org grant ruled on #1575 is refused for every member. Control-plane journal: ``` data-collections org access refused person=proof-member role=editors status=400 reason="Grist said: {"error":"Invalid email address included"}" data-collections org access refused person=proof-operator role=owners status=400 reason="Grist said: {"error":"Invalid email address included"}" ``` Grist's access API only accepts an email-shaped key. The product sends the bare kanidm username. The founding operator only works because Grist claims `GRIST_DEFAULT_EMAIL=operator` at first boot, which skips that validation. Org access on the box lists `operator` (owners) and the health fixture only. **Listmonk (newsletters).** `provisionOperator` posts `{username, type, user_role_id, password_login}` with no `email` and no `name`. Listmonk's `users` table on the box holds only `idss-admin` and `idss-api`, so the pre-provision failed. The refusal reason was not captured: `ReconcileRole`'s error is never logged. Listmonk 6.1.0 validates `email` and `name` on create-user. **Not yet seen, same cause.** Listmonk's OIDC sign-in matches and auto-creates accounts by the `email` claim. `internal/kanidm` never sets `mail` on a person, so kanidm sends no email claim. A member's first sign-in to newsletters is likely to fail too. The door legs have never run, so this is unproven. ## The decision What email-shaped identity does a member wear in a service that keys people by email? The #1535 ruling says `X-Idss-Identity` is the kanidm username, and the glossary says identity lives in the IdP, not the mailbox. Neither answers this. ### Option 1 (recommended): the member's fixed address, `<folded member slug>@<apex>` The glossary already defines this under **Mailbox**: a member's fixed address, never reissued to another person. Use it as the email-shaped identity whether or not the Mailbox has been claimed. - kanidm: set it as the person's `mail` at create, and backfill existing persons. The OIDC `email` claim then carries it, so Listmonk matches its pre-provisioned account. - Auth gate: emit it as a second header (`X-Idss-Email`) beside `X-Idss-Identity`. `X-Idss-Identity` stays the kanidm username, so the #1535 ruling is untouched. - Grist: read `X-Idss-Email` as its forward-auth header. `GRIST_DEFAULT_EMAIL`, the row-level rule, the health keys and the per-person grant all use the address. - Listmonk: `provisionOperator` sends the address as `email` and the display name as `name`. - Cost: the address receives no mail until the member claims their Mailbox, so anything a service sends there bounces. No port relies on a service emailing a member today. - Cost: Grist accounts already keyed by a bare username are orphaned. Only `whakatohea-demo` has any. ### Option 2: ask for a real email when a member is added This is a new required field in add-member and invite, and a change to the members flow and wireframes (`needs-design`). It ties a member's identity to an outside mailbox, which the glossary avoids. It is the larger change and blocks #1547 longer. ### Not viable: grant at first sign-in instead Grist creates a first-sign-in account keyed by the bare username, and its API still refuses to grant to that key. ## Also owed, whichever option is ruled - `newslettersvc` captures Listmonk's refusal body and logs the reconcile error, as `f541461c` did for Grist (GOTCHAS #245). - A `GOTCHAS.md` entry: services that key people by email, and what they do with a bare username. ## Acceptance - [ ] Ruling recorded as an ADR amending the #1535 identity ruling. - [ ] On a fresh rented-services drive, `proof-member` and `proof-operator` read as applied on data-collections and newsletters after `redeploy-services`. - [ ] Grist org access lists both people at the ruled roles. Listmonk `users` holds `proof-operator` at Super Admin. - [ ] A member's first OIDC sign-in to newsletters lands on the pre-provisioned account, not a second one.
Author
Owner

Listmonk refusal reason now confirmed. Replaying the product's own refused create request on the kept droplet 170.64.164.213 returns 400 {"message":"Invalid fields: email"}, and the users table still holds 2 rows. The ticket body said the reason was not captured; it now is.

334f220c lands the ruling-independent half: newslettersvc carries Listmonk's refusal body in its error and logs it, and GOTCHAS #246 records the hazard. The fakeListmonk double still accepts an email-less create; whoever lands the ruling tightens it first so the pre-provision test goes red for the right reason.

**Listmonk refusal reason now confirmed.** Replaying the product's own refused create request on the kept droplet `170.64.164.213` returns `400 {"message":"Invalid fields: email"}`, and the `users` table still holds 2 rows. The ticket body said the reason was not captured; it now is. `334f220c` lands the ruling-independent half: `newslettersvc` carries Listmonk's refusal body in its error and logs it, and GOTCHAS #246 records the hazard. The `fakeListmonk` double still accepts an email-less create; whoever lands the ruling tightens it first so the pre-provision test goes red for the right reason.
Author
Owner

The drive's reporter reached the same diagnosis independently in #1581 (closed as a duplicate of this). Its evidence table is worth reading alongside: surveys cleared at the redeploy, data-collections was already owed from add-member onward, and newsletters only arrives with the redeploy so its reconcile had never run before.

The drive's reporter reached the same diagnosis independently in #1581 (closed as a duplicate of this). Its evidence table is worth reading alongside: `surveys` cleared at the redeploy, `data-collections` was already owed from `add-member` onward, and `newsletters` only arrives with the redeploy so its reconcile had never run before.
Author
Owner

RULED by Ben, 2026-09-18: option 2. A member carries a REAL email address, asked for when the member is added. The synthesised fixed-address identity (option 1) is not taken.

This session is building it. The add-member form gains a required field, so the members flow and wireframe change in the same work and the frames go to Ben to read. Open sub-questions (the founding operator's email, members who already exist without one, the self-signup form) get a recommendation each once the surfaces are mapped.

**RULED by Ben, 2026-09-18: option 2.** A member carries a REAL email address, asked for when the member is added. The synthesised fixed-address identity (option 1) is not taken. This session is building it. The add-member form gains a required field, so the members flow and wireframe change in the same work and the frames go to Ben to read. Open sub-questions (the founding operator's email, members who already exist without one, the self-signup form) get a recommendation each once the surfaces are mapped.
Author
Owner

Landed in 30faf8df — ADR 0251. Built as ruled (option 2).

  • Add member by hand requires the person's real email; refused before anything is written when missing, malformed, or held by another member.
  • The address is kanidm mail, written in the person create.
  • The Grist and Listmonk ports hand the service the email, resolved from the IdP per call; a person with none answers ErrNoEmailOnRecord. Both doubles now refuse what the real services refused.
  • X-Idss-Identity stays the username. The gate answers X-Idss-Email for data-collections and the route hands it to Grist as the identity; no email on record is a worded refusal.
  • Control-panel form, wireframe, flow, OpenAPI and drive fixtures carry the field.

Go suite, the full control-panel suite (1688 tests) and a real caddy validate of the new route line pass. Unproven live until #1547 run 13 — in particular whether the control plane's kanidm account may write mail in a create, and whether Listmonk's OIDC sign-in finds the pre-provisioned account by the email claim.

Follow-ups: #1583 (self-signup asks the email), #1584 (record or correct an email on member detail; needs design).

Reported to Ben with the change: a by-hand person with no email can no longer be added, and two members cannot share one inbox. Making the address optional is the small repair if he wants it.

**Landed in `30faf8df` — ADR 0251.** Built as ruled (option 2). - Add member by hand requires the person's real email; refused before anything is written when missing, malformed, or held by another member. - The address is kanidm `mail`, written in the person create. - The Grist and Listmonk ports hand the service the email, resolved from the IdP per call; a person with none answers `ErrNoEmailOnRecord`. Both doubles now refuse what the real services refused. - `X-Idss-Identity` stays the username. The gate answers `X-Idss-Email` for data-collections and the route hands it to Grist as the identity; no email on record is a worded refusal. - Control-panel form, wireframe, flow, OpenAPI and drive fixtures carry the field. Go suite, the full control-panel suite (1688 tests) and a real `caddy validate` of the new route line pass. **Unproven live** until #1547 run 13 — in particular whether the control plane's kanidm account may write `mail` in a create, and whether Listmonk's OIDC sign-in finds the pre-provisioned account by the email claim. Follow-ups: #1583 (self-signup asks the email), #1584 (record or correct an email on member detail; needs design). Reported to Ben with the change: a by-hand person with no email can no longer be added, and two members cannot share one inbox. Making the address optional is the small repair if he wants it.
ben closed this issue 2026-09-18 15:34:14 +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#1580
No description provided.