LTI Integration Bug Fix: User Identity Should Be Tied to 'sub' Claim, Not Email
A critical bug was discovered in a CircuitVerse LTI 1.3 integration where users were being identified by their email address rather than the stable 'sub' claim in the id_token, a flaw that passed all standard tests but posed a real security risk. The fix scopes identity using a combination of deployment ID and the sub claim, preventing cross-institution collisions where two users at different institutions could share the same sub value. A separate issue arose because Canvas POSTs the id_token as a cross-site request, causing browsers to block SameSite=Lax session cookies and breaking the login flow; the temporary fix was to set SameSite=None on the session cookie. The developer also added a self-referential parent_group_id field to the existing Group model to support subgroups, avoiding the complexity of introducing a separate Subgroup model. Upcoming work includes properly replacing the SameSite=None cookie change and closing two open pull requests.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in