spec: on IDIP every service keys a member on their AID and shows a community-unique display name #1915

Open
opened 2026-09-27 18:44:08 +00:00 by ben · 0 comments
Owner

Problem Statement

On an IDIP community (identity through the idss-idp bridge, no kanidm), a member's
accounts in the community's services are keyed inconsistently, and most services
cannot sign anyone in at all:

  • Eight catalogue services are wired to kanidm sign-in that does not exist on IDIP.
    The front door renders kanidm only off the IDIP path, and id.<apex> is the bridge,
    which declares three sign-in clients (the gate, Nextcloud, NetBird). Chat
    (Mattermost), code (Forgejo), meetings (Jitsi), mail (Stalwart + Roundcube),
    whakapapa (Gramps), video (PeerTube), newsletters (Listmonk) and document-archive
    (Paperless) all render kanidm OIDC paths and kanidm provisioning oneshots. On IDIP no
    one can sign in to them. #1903's "these services are safe" verdict string-matched
    renders built with a kanidm-shaped host and never modelled IDIP (GOTCHAS #349 is
    wrong on this point).
  • Account keys follow the member-chosen handle, which nothing makes unique on the
    anchored roster, and which matou-app derives from the applicant's email local part
    (so every ben@… asks for ben). Two people can land in one account.
  • The bridge sends no role claims, so a steward is not admin in any service,
    including Nextcloud.
  • Names shown in services are opaque or ambiguous: an AID-keyed account shows its
    key (Grist showed m-<hash> until ADR 0283 amendment 2), and several people show as
    "ben".

Solution

On IDIP, every service keys a member's account on their AID and shows their
community-unique display name (Ben's rulings, 2026-09-27):

  1. Account key (UID): the raw AID wherever the service accepts it. Where it does not
    (length, case or charset limits), a stable form derived only from the AID: nobody
    can claim it, and it never changes.
  2. Shown name: the member's display name, de-duplicated per community with an
    _N suffix
    : the first "Ben" stays "Ben", the next is "Ben_2", then "Ben_3".
  3. No migration (as #1902 A1): existing handle-keyed accounts are left in place; a
    person gets a fresh AID-keyed account on their next sign-in, and an admin moves data
    by hand if it matters.

The bridge becomes the IDIP sign-in provider for every OIDC service (a declared client
per service), carries the identity claims those services need, and carries role claims
so a steward is admin everywhere. Until a service's IDIP sign-in lands, an IDIP
community is refused that install in words, never given a service nobody can sign
into.

User Stories

  1. As a member of an IDIP community, I want each service to know me by my AID, so that no one else can ever land in my account.
  2. As a member, I want to sign in to Paperless, Gramps, Listmonk, PeerTube, Forgejo, Mattermost and Jitsi through my community sign-in, so that the services my community installs actually work for me.
  3. As a member, I want every service to show my display name, so that people recognise me.
  4. As a member who shares a display name with someone else, I want one of us shown as "Ben_2", so that no two people look identical in a sharing or member list.
  5. As the first person to take a display name, I want to keep it unsuffixed, so that joiners never rename me.
  6. As a member, I want my shown name to stay the same across sign-ins, so that it doesn't shift under me when others join or leave.
  7. As a member, I want a declined join (someone turned away before ever becoming a member) not to hold a display name, so that a dead join never pushes me to a suffix.
  8. As a member, I want a removed member's display name to stay held, so that a newcomer is never shown under a departed person's name in records that person left behind.
  9. As a member of a service that cannot take a raw AID as a username (Mattermost, Forgejo, PeerTube), I want an AID-derived username, so that my account is still unique and unclaimable.
  10. As a member of an email-keyed service (Listmonk, Paperless's match), I want an AID-derived address used when I have none on record, so that I can still sign in, and so that a self-typed address can never match someone else's account.
  11. As a steward, I want to be admin in every service I sign in to, so that I can run it for the community.
  12. As a steward, I want a demoted steward to lose admin on their next sign-in (or the next reconcile), so that roles follow the roster.
  13. As a steward, I want an install of a service IDIP can't sign into yet to be refused with a plain reason, so that I never install something nobody can use.
  14. As a steward, I want existing handle-keyed accounts left untouched when the key changes, so that no data is destroyed without my say-so.
  15. As a steward on a kanidm community, I want nothing to change, so that working communities keep working.
  16. As a member of Nextcloud on IDIP, I want my steward role to make me Nextcloud admin, so that files administration isn't stranded.
  17. As a member of LimeSurvey, I want my display name shown instead of a raw id, so that survey admins see who I am.
  18. As a member of Jitsi, I want meetings to show my display name, so that others in a call know who I am.
  19. As an operator debugging sign-in, I want a service that cannot resolve a member's key to refuse in words, so that a failure is never a silent new stranger account.

Implementation Decisions

  • Unique display names live in the roster, beside the #1908 unique-handle rule, with
    the same holder rules: a declined join (archived, never issued) holds nothing; a
    removed member (archived after issue) keeps theirs; a name already handed to an AID
    is sticky. Comparison is case-insensitive. The suffix is _N (lowest free N ≥ 2).
    The resolved name is stored on the row and is what the bridge mints as name.
  • One derived handle for services that reject a raw AID: u + the first 20
    lowercase hex characters of sha256(AID). That is 21 characters, lowercase, and starts
    with a letter, so it fits Mattermost (≤22), Forgejo, PeerTube (no -) and a mailbox
    local part. The bridge sends it as its own claim beside sub.
  • An AID-derived email for email-keyed services is sent as its own claim, never in
    email. Grist keeps its existing m-<24 hex>@<apex> form (ADR 0283); no migration.
  • Role claims: the bridge emits the operator role in each shape the services' renders
    read (a groups membership, plus the per-service role claim names those renders map),
    derived from the roster's live operator standing.
  • Bridge sign-in clients: a declared client per catalogue OIDC service (id, redirect,
    secret from the service's clan-var generator), added when the service is placed.
    Discovery is reachable where each service's OIDC library looks for it.
  • Each OIDC service's render gains an IDIP branch, keyed on the community's IdP shape
    (as files already does): point at the bridge, not kanidm; key the account on sub, the
    derived handle, or the derived email per the table below; take the display name from
    name; no kanidm provisioning oneshots on IDIP.
  • Control-plane service ports that look people up by person id (chat, code) resolve
    the same derived handle on IDIP.
  • Install guard: on an IDIP community, placing a catalogue service whose IDIP sign-in
    has not landed is refused with a worded reason. The guard's list shrinks as each
    service ticket lands.
Service Account key on IDIP Name
files / calendar (Nextcloud) sub (done, #1902) name
document-archive (Paperless) raw AID name
whakapapa (Gramps) raw AID name
surveys (LimeSurvey) gate header = AID (done) unique display name as full name
data-collections (Grist) m-<hash>@apex (done, ADR 0283) unique display name via SCIM
newsletters (Listmonk) AID-derived email name
video (PeerTube) derived handle name
code (Forgejo) derived handle, linked on sub name
chat (Mattermost) derived handle name
meetings (Jitsi) no accounts name
static-sites AID (done) —
mail ruling owed —

Testing Decisions

  • Test external behaviour at the highest seam: (1) the roster → bridge claims seam
    (given a roster, the claims a member's token carries); (2) each service's render built
    with an IDIP config (points at the bridge, keys on the ruled claim, no kanidm oneshots),
    following the files render's IDIP test; (3) a live proof per service, where a
    member and a steward sign in on a real IDIP gateway and land in distinct AID-keyed
    accounts, the steward as admin. A render string-match alone is not proof: that is how
    #1903 passed wrongly.
  • Kanidm-path renders must be byte-identical before and after (a guard test per touched
    render).
  • Unique display names: collision, stability, the declined/removed rules, case folding.

Out of Scope

  • Migrating existing handle-keyed accounts (ruled no migration).
  • Letting applicants choose their own handle in matou-app (a matou-app change).
  • Mail on IDIP until Ben rules the member-facing address and directory source (its
    ticket is ready-for-human).
  • kanidm communities.

Further Notes

  • Rulings: Ben, 2026-09-27, in session (AID key everywhere; unique display names with
    _N; AID-derived form where a raw AID is refused; no migration). ADR 0283 and its
    amendments record the Grist half.
  • Found on whakatohea-demo while fixing Grist's "cannot find user" (ADR 0283, GOTCHAS
    #351).
## Problem Statement On an IDIP community (identity through the idss-idp bridge, no kanidm), a member's accounts in the community's services are keyed inconsistently, and most services cannot sign anyone in at all: - **Eight catalogue services are wired to kanidm sign-in that does not exist on IDIP.** The front door renders kanidm only off the IDIP path, and `id.<apex>` is the bridge, which declares three sign-in clients (the gate, Nextcloud, NetBird). Chat (Mattermost), code (Forgejo), meetings (Jitsi), mail (Stalwart + Roundcube), whakapapa (Gramps), video (PeerTube), newsletters (Listmonk) and document-archive (Paperless) all render kanidm OIDC paths and kanidm provisioning oneshots. On IDIP no one can sign in to them. #1903's "these services are safe" verdict string-matched renders built with a kanidm-shaped host and never modelled IDIP (GOTCHAS #349 is wrong on this point). - **Account keys follow the member-chosen handle**, which nothing makes unique on the anchored roster, and which matou-app derives from the applicant's email local part (so every `ben@…` asks for `ben`). Two people can land in one account. - **The bridge sends no role claims**, so a steward is not admin in any service, including Nextcloud. - **Names shown in services are opaque or ambiguous**: an AID-keyed account shows its key (Grist showed `m-<hash>` until ADR 0283 amendment 2), and several people show as "ben". ## Solution On IDIP, every service keys a member's account on their **AID** and shows their **community-unique display name** (Ben's rulings, 2026-09-27): 1. **Account key (UID):** the raw AID wherever the service accepts it. Where it does not (length, case or charset limits), a stable form derived only from the AID: nobody can claim it, and it never changes. 2. **Shown name:** the member's display name, **de-duplicated per community with an `_N` suffix**: the first "Ben" stays "Ben", the next is "Ben_2", then "Ben_3". 3. **No migration** (as #1902 A1): existing handle-keyed accounts are left in place; a person gets a fresh AID-keyed account on their next sign-in, and an admin moves data by hand if it matters. The bridge becomes the IDIP sign-in provider for every OIDC service (a declared client per service), carries the identity claims those services need, and carries role claims so a steward is admin everywhere. Until a service's IDIP sign-in lands, an IDIP community is refused that install in words, never given a service nobody can sign into. ## User Stories 1. As a member of an IDIP community, I want each service to know me by my AID, so that no one else can ever land in my account. 2. As a member, I want to sign in to Paperless, Gramps, Listmonk, PeerTube, Forgejo, Mattermost and Jitsi through my community sign-in, so that the services my community installs actually work for me. 3. As a member, I want every service to show my display name, so that people recognise me. 4. As a member who shares a display name with someone else, I want one of us shown as "Ben_2", so that no two people look identical in a sharing or member list. 5. As the first person to take a display name, I want to keep it unsuffixed, so that joiners never rename me. 6. As a member, I want my shown name to stay the same across sign-ins, so that it doesn't shift under me when others join or leave. 7. As a member, I want a declined join (someone turned away before ever becoming a member) not to hold a display name, so that a dead join never pushes me to a suffix. 8. As a member, I want a removed member's display name to stay held, so that a newcomer is never shown under a departed person's name in records that person left behind. 9. As a member of a service that cannot take a raw AID as a username (Mattermost, Forgejo, PeerTube), I want an AID-derived username, so that my account is still unique and unclaimable. 10. As a member of an email-keyed service (Listmonk, Paperless's match), I want an AID-derived address used when I have none on record, so that I can still sign in, and so that a self-typed address can never match someone else's account. 11. As a steward, I want to be admin in every service I sign in to, so that I can run it for the community. 12. As a steward, I want a demoted steward to lose admin on their next sign-in (or the next reconcile), so that roles follow the roster. 13. As a steward, I want an install of a service IDIP can't sign into yet to be refused with a plain reason, so that I never install something nobody can use. 14. As a steward, I want existing handle-keyed accounts left untouched when the key changes, so that no data is destroyed without my say-so. 15. As a steward on a kanidm community, I want nothing to change, so that working communities keep working. 16. As a member of Nextcloud on IDIP, I want my steward role to make me Nextcloud admin, so that files administration isn't stranded. 17. As a member of LimeSurvey, I want my display name shown instead of a raw id, so that survey admins see who I am. 18. As a member of Jitsi, I want meetings to show my display name, so that others in a call know who I am. 19. As an operator debugging sign-in, I want a service that cannot resolve a member's key to refuse in words, so that a failure is never a silent new stranger account. ## Implementation Decisions - **Unique display names live in the roster**, beside the #1908 unique-handle rule, with the same holder rules: a declined join (archived, never issued) holds nothing; a removed member (archived after issue) keeps theirs; a name already handed to an AID is sticky. Comparison is case-insensitive. The suffix is `_N` (lowest free N ≥ 2). The resolved name is stored on the row and is what the bridge mints as `name`. - **One derived handle** for services that reject a raw AID: `u` + the first 20 lowercase hex characters of sha256(AID). That is 21 characters, lowercase, and starts with a letter, so it fits Mattermost (≤22), Forgejo, PeerTube (no `-`) and a mailbox local part. The bridge sends it as its own claim beside `sub`. - **An AID-derived email** for email-keyed services is sent as its own claim, never in `email`. Grist keeps its existing `m-<24 hex>@<apex>` form (ADR 0283); no migration. - **Role claims:** the bridge emits the operator role in each shape the services' renders read (a `groups` membership, plus the per-service role claim names those renders map), derived from the roster's live operator standing. - **Bridge sign-in clients:** a declared client per catalogue OIDC service (id, redirect, secret from the service's clan-var generator), added when the service is placed. Discovery is reachable where each service's OIDC library looks for it. - **Each OIDC service's render gains an IDIP branch**, keyed on the community's IdP shape (as files already does): point at the bridge, not kanidm; key the account on `sub`, the derived handle, or the derived email per the table below; take the display name from `name`; no kanidm provisioning oneshots on IDIP. - **Control-plane service ports** that look people up by person id (chat, code) resolve the same derived handle on IDIP. - **Install guard:** on an IDIP community, placing a catalogue service whose IDIP sign-in has not landed is refused with a worded reason. The guard's list shrinks as each service ticket lands. | Service | Account key on IDIP | Name | |---|---|---| | files / calendar (Nextcloud) | `sub` (done, #1902) | `name` | | document-archive (Paperless) | raw AID | `name` | | whakapapa (Gramps) | raw AID | `name` | | surveys (LimeSurvey) | gate header = AID (done) | unique display name as full name | | data-collections (Grist) | `m-<hash>@apex` (done, ADR 0283) | unique display name via SCIM | | newsletters (Listmonk) | AID-derived email | `name` | | video (PeerTube) | derived handle | `name` | | code (Forgejo) | derived handle, linked on `sub` | `name` | | chat (Mattermost) | derived handle | `name` | | meetings (Jitsi) | no accounts | `name` | | static-sites | AID (done) | — | | mail | **ruling owed** | — | ## Testing Decisions - Test external behaviour at the highest seam: (1) the roster → bridge claims seam (given a roster, the claims a member's token carries); (2) each service's render built with an IDIP config (points at the bridge, keys on the ruled claim, no kanidm oneshots), following the files render's IDIP test; (3) **a live proof per service**, where a member and a steward sign in on a real IDIP gateway and land in distinct AID-keyed accounts, the steward as admin. A render string-match alone is not proof: that is how #1903 passed wrongly. - Kanidm-path renders must be byte-identical before and after (a guard test per touched render). - Unique display names: collision, stability, the declined/removed rules, case folding. ## Out of Scope - Migrating existing handle-keyed accounts (ruled no migration). - Letting applicants choose their own handle in matou-app (a matou-app change). - Mail on IDIP until Ben rules the member-facing address and directory source (its ticket is ready-for-human). - kanidm communities. ## Further Notes - Rulings: Ben, 2026-09-27, in session (AID key everywhere; unique display names with `_N`; AID-derived form where a raw AID is refused; no migration). ADR 0283 and its amendments record the Grist half. - Found on whakatohea-demo while fixing Grist's "cannot find user" (ADR 0283, GOTCHAS #351).
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.

Dependencies

No dependencies set.

Reference
Matou/idss#1915
No description provided.