idip: Listmonk (newsletters) signs in through the bridge, keyed on the AID-derived email #1920

Open
opened 2026-09-27 18:44:28 +00:00 by ben · 1 comment
Owner

Parent

#1915

What to build

Listmonk's IDIP render branch: bridge issuer, users matched/created by the AID-derived email claim, name from name, steward → admin. The newsletters port resolves the same derived email on IDIP.

Acceptance criteria

  • IDIP render test; newsletters port uses the derived email on IDIP
  • The kanidm-path render is byte-identical before and after (guard test)
  • Live proof on an IDIP gateway: a member and a steward sign in and land in two distinct accounts keyed as ruled, the steward as admin; screenshots/evidence attached

Blocked by

## Parent #1915 ## What to build Listmonk's IDIP render branch: bridge issuer, users matched/created by the AID-derived email claim, name from `name`, steward → admin. The newsletters port resolves the same derived email on IDIP. ## Acceptance criteria - [ ] IDIP render test; newsletters port uses the derived email on IDIP - [ ] The kanidm-path render is byte-identical before and after (guard test) - [ ] Live proof on an IDIP gateway: a member and a steward sign in and land in two distinct accounts keyed as ruled, the steward as admin; screenshots/evidence attached ## Blocked by - #1918

Blocked — a design ruling is needed on how Listmonk keys on the AID-derived email

This slice cannot be implemented as a straight render-branch mirror of #1918/#1924, because of a genuine incompatibility between the parent-spec claim design and Listmonk's OIDC capability:

  • The bridge (#1917, closed) sends the AID-derived email as its own claim derived_email, and its locked acceptance + a passing test require the standard email claim to carry only a real address on record (internal/idp/storage.go:596-660, internal/idp/claims_1917_seam_test.go). So on IDIP an email-less member's email claim is empty.
  • Listmonk keys/creates OIDC users on the standard email claim and has no claim-mapping setting (confirmed in internal/newslettersvc/newslettersvc.go:73-78,273-276,422-437 and the theming research doc) — it cannot be told to read derived_email. So as things stand the derived email never reaches Listmonk and an email-less member cannot sign in.
  • Paperless (#1918) sidestepped this by keying on sub (the AID); Jitsi (#1924) on name. Listmonk is the first true email-keyed consumer of the bridge, so it is the first slice to hit this gap.

The decision needed (a human's call — it reinterprets the human-locked #1917 invariant on a security-relevant account-keying surface)

Option A (I recommend): a per-client bridge exception — for the newsletters (Listmonk) client only, emit the derived email in the standard email claim when the member has no real address on record (realizing parent-spec User Story 10, "an AID-derived address used when I have none on record"). The blanket #1917 invariant stays intact for every other client (its gate-client test still passes). The render then points Listmonk at the bare bridge issuer + the shared client secret + auto_create_users + the Members role (the #1918/#1924 shape); the newsletters reconciler's EmailOf resolves the same derived email on IDIP (mirroring gristEmails in control-plane/cmd/control-plane/main.go). Fully revertible, provable by seam/render tests; the live proof (AC3) deferred like #1918/#1924.

Option B: keep #1917 blanket-intact and introduce another mechanism (e.g. a claim-remapping proxy in front of Listmonk) — heavier, none exists today.

Option C: something else.

I asked in Mattermost (question cssir48rd7bddx3m1u6p4dpcge) but got no reply within the wait window, so I'm parking the ticket rather than guessing. A late reply in that thread is not lost — the next ask resumes it.

Why human

Resolving this reinterprets a human-locked parent-spec decision (#1917: "the AID-derived email … never in email", with a passing test) on the security-relevant question of what keys a member's Listmonk account. The correctness of any choice ultimately rests on the deferred live proof and on product intent, not on a test I can run this iteration, so it is not mine to rule.

To re-arm

Pick Option A (or an alternative) and re-add ready-for-agent. With Option A confirmed, the implementation is: (1) per-client email-claim branch in the bridge for the newsletters client; (2) renderNewslettersOIDCBridge + NewslettersConfig.BridgeIDP; (3) the newsletters entry in catalogueBridgeClients (idssidp.go) with a shared newsletters-oidc-secret clan var; (4) thread BridgeIDP through newsletters_attach.go / portroute.go (deploy.go already threads o.bridgeIDP); (5) EmailOf IDIP branch for newsletters in main.go; (6) drop newsletters from notYetIDIPReady (assess.go); (7) tests + STATUS.md.

## Blocked — a design ruling is needed on how Listmonk keys on the AID-derived email This slice cannot be implemented as a straight render-branch mirror of #1918/#1924, because of a genuine incompatibility between the parent-spec claim design and Listmonk's OIDC capability: - The bridge (#1917, closed) sends the AID-derived email as its **own** claim `derived_email`, and its **locked** acceptance + a passing test require the standard `email` claim to carry **only a real address on record** (`internal/idp/storage.go:596-660`, `internal/idp/claims_1917_seam_test.go`). So on IDIP an email-less member's `email` claim is **empty**. - Listmonk keys/creates OIDC users on the standard `email` claim and has **no claim-mapping setting** (confirmed in `internal/newslettersvc/newslettersvc.go:73-78,273-276,422-437` and the theming research doc) — it cannot be told to read `derived_email`. So as things stand the derived email never reaches Listmonk and an email-less member cannot sign in. - Paperless (#1918) sidestepped this by keying on `sub` (the AID); Jitsi (#1924) on `name`. **Listmonk is the first true email-keyed consumer of the bridge**, so it is the first slice to hit this gap. ### The decision needed (a human's call — it reinterprets the human-locked #1917 invariant on a security-relevant account-keying surface) **Option A (I recommend):** a per-client bridge exception — for the newsletters (Listmonk) client only, emit the derived email in the standard `email` claim when the member has no real address on record (realizing parent-spec User Story 10, "an AID-derived address used when I have none on record"). The blanket #1917 invariant stays intact for every other client (its gate-client test still passes). The render then points Listmonk at the bare bridge issuer + the shared client secret + `auto_create_users` + the Members role (the #1918/#1924 shape); the newsletters reconciler's `EmailOf` resolves the same derived email on IDIP (mirroring `gristEmails` in `control-plane/cmd/control-plane/main.go`). Fully revertible, provable by seam/render tests; the live proof (AC3) deferred like #1918/#1924. **Option B:** keep #1917 blanket-intact and introduce another mechanism (e.g. a claim-remapping proxy in front of Listmonk) — heavier, none exists today. **Option C:** something else. I asked in Mattermost (question `cssir48rd7bddx3m1u6p4dpcge`) but got no reply within the wait window, so I'm parking the ticket rather than guessing. A late reply in that thread is not lost — the next ask resumes it. ### Why human Resolving this reinterprets a **human-locked parent-spec decision** (#1917: "the AID-derived email … never in `email`", with a passing test) on the security-relevant question of what keys a member's Listmonk account. The correctness of any choice ultimately rests on the deferred live proof and on product intent, not on a test I can run this iteration, so it is not mine to rule. ### To re-arm Pick Option A (or an alternative) and re-add `ready-for-agent`. With Option A confirmed, the implementation is: (1) per-client `email`-claim branch in the bridge for the newsletters client; (2) `renderNewslettersOIDCBridge` + `NewslettersConfig.BridgeIDP`; (3) the `newsletters` entry in `catalogueBridgeClients` (`idssidp.go`) with a shared `newsletters-oidc-secret` clan var; (4) thread `BridgeIDP` through `newsletters_attach.go` / `portroute.go` (`deploy.go` already threads `o.bridgeIDP`); (5) `EmailOf` IDIP branch for newsletters in `main.go`; (6) drop `newsletters` from `notYetIDIPReady` (`assess.go`); (7) tests + STATUS.md.
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#1920
No description provided.