idip: Mattermost (chat) signs in through the bridge, keyed on the derived handle #1923
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.
Depends on
Reference
Matou/idss#1923
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?
Parent
#1915
What to build
Mattermost's IDIP render branch: sign-in through the bridge (not kanidm's GitLab-shaped paths), username = the derived handle, account bound to
sub, display name fromname, steward → system admin. The chat port's lookup-by-username uses the derived handle on IDIP.Acceptance criteria
Blocked by
Blocked on a design decision — asked a human, no reply within the wait
Working #1923 I hit a decision that is not mine to rule under ADR 0174: it is not provable by any test I can run in the sandbox (there is no live IDIP+Mattermost gateway), and one option widens a stated security invariant. I posted the question to the ask-human thread; no reply came within the wait, so per the workflow I am parking this for a human rather than re-asking or guessing.
The decision
The render must make Mattermost's username = the derived handle, but Mattermost's SSO (
GitLabSettings, the shipped kanidm render ininternal/clan/chat.go) has no username-claim mapping knob — it consumes the OIDC userinfo and reads the standard claims (username ←preferred_username, id ←sub; confirmed by the kanidm render pointingUserAPIEndpointat the OIDC userinfo).On IDIP the bridge (
internal/idp/storage.go,setUserinfo) sends the AID-derived handle only in its ownhandleclaim, and by design (#1908/#1917) never inpreferred_username— which stays the member-chosen, non-unique handle. So repointing Mattermost at the bridge as-is would key its username on the colliding member handle, which is precisely the failure #1915 exists to prevent (and a render string-match would "pass" while sign-in strands two members in one account — the #1903 anti-pattern the spec warns against).Making
username = derived handlereal therefore needs a bridge-side choice:mattermostclient only, the bridge setspreferred_username= derived handle — an explicit per-client exception to #1908. The render then just repoints the threeGitLabSettingsendpoints at the bridge.id=sub,username=handle,name,email) for themattermostclient.Also blocking AC3 (live proof)
The chat port is not wired into deploy:
AttachChathas no production caller,chatis not inportAttachers, and no kanidm OAuth2 client for Mattermost is provisioned anywhere. So AC3's "live proof on an IDIP gateway" is not producible this iteration. Either a seam-proof is accepted under ADR 0174 (as #1918/#1925 did for their live-proof clauses), or this ticket first needs the chat deploy path — which is out of this slice's scope (needs-design).What a human must decide to re-arm this
username = derived handle(this settles whetherinternal/idp/storage.gochanges, and whether #1908 gets a documented per-client exception).The chatsvc half — the port's lookup-by-username resolving
derivedHandle(AID)on IDIP (mirroringkeria.BackendEmail) — is unambiguous and ready to build the moment (1) is settled.Why human
Not a two-way door I can rule: the choice is not provable by a test I can run (no live IDIP+Mattermost gateway exists), and option (A) widens a security invariant (#1908, the member-chosen
preferred_usernamerule). Both need a human's call.