bug: on IDIP every preferred_username-keyed service (Gramps, video, newsletters, surveys, Paperless, portroute) lets a member take over another's account by choosing the same username #1908
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1908
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
On an IDIP community, every service that keys its accounts on the OIDC
preferred_usernameclaim lets a member take over another member's account by choosing the same username.preferred_usernamecomes from the member's credential (internal/idp/ledger_verifier.go:135; words doorkeri_verifier.go:138), the member picks it at join, and nothing makes it unique. On whakatohea-demo, all three identities carryben.#1902 fixes Nextcloud only (ruled A1: IDIP keys Nextcloud on
sub= AID). The same collision remains for:GRAMPSWEB_OIDC_USERNAME_CLAIM = "preferred_username",internal/clan/whakapapa.go:645"username-property": "preferred_username",internal/clan/video.go:660preferred_username,internal/clan/newsletters.go:554,635preferred_username,internal/clan/surveys.go:227internal/clan/paperless.go:620internal/clan/portroute.go:42(Audit for any others while fixing this.)
Options (Ben to rule)
B. The bridge makes
preferred_usernameunique per community. The bridge recordsusername → AIDin the roster projection the first time an AID presents (#1887's presented rows already hold it). A later AID with a taken username gets a free suffix (ben-2). One change fixes every service, and existing accounts stay where they are. Costs: first come first served (the founder presents first on IDIP), the claim can differ from what the member typed, and communities that already collided stay merged until an admin splits them.C. Key each service on
sub(AID) the way #1902 does for Nextcloud. Accounts follow the permanent identity. It is a per-service change, each service needs its own "existing accounts" answer, and some services may not support an opaque 44-char uid as a login name (to be checked per service).D. Refuse a colliding username at the door. The bridge refuses a presentation whose username is already held by another AID, with a clear message. It is the simplest and has no suffixes, but the member cannot get in until the credential is reissued with another name, and issuance happens in the app (ADR 0235), not here.
Recommendation: B. It closes the takeover for every service at once with no migration, and it composes with #1902 (Nextcloud on the AID is unaffected by the suffix).
Acceptance criteria (after the ruling)
userinfo/ID token for the second AID carries a distinctpreferred_username).References
sub= AID), ADR 0235 d.5/d.6🤖 Generated with Claude Code
Ruled (Ben, 2026-09-26): option B. The bridge makes
preferred_usernameunique per community. Theno-triageandready-for-humanholds are removed as this comment is posted.username → AIDclaim record in the control plane's roster projection. A username is held by the first AID recorded against it, and an existing roster row holds its username for its own AID.ben-2,ben-3, …). The suffixed name is recorded against that AID and is stable: the same AID always gets the same name on later sign-ins. The claim write goes over the same bearer-authed loopback route as #1887's presented rows, with verifier-attested fields only.userinfoand ID token carry the recorded (possibly suffixed) name inpreferred_username.name(the display name) andsub(the AID) are unchanged.ben) stay merged until an admin splits them by hand.sub, so the suffix does not affect it).Acceptance criteria, as ruled:
preferred_usernamevalues from the bridge (seam test overuserinfo+ the ID token). The second is<name>-2, and it is the same on a second sign-in.preferred_username(no service-side change needed).swarm-claim host=matou-dev-server-01 run=33854
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1908 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
name#1916