Skip to content

Conversation

sandhose
Copy link
Member

@sandhose sandhose commented Jul 3, 2025

Fixes #2090

This adds support for receiving OpenID Connect Back-Channel Logout notifications. Those are fired when a user signs out from their upstream provider

This can be reviewed commit by commit. Note that we're now saving the ID token claims as a JSON field in the database. We could choose to backfill those if we wanted to make this work retroactively on previous sessions, but we don't really have nice primitives to do this kind of backfilling.

How to test this:

  • setup a Keycloak instance connected to MAS (see the updated docs)
  • sign in MAS with a keycloak account
  • go to the Keycloak account self-service URL (something like <kc>/realms/<realm>/account/)
  • click 'Sign out'
  • browser sessions and client sessions may be logged out, depending on the on_backchannel_logout setting on the provider

@sandhose sandhose force-pushed the quenting/backchannel-logout/record-id-token-claims branch from e35cf0e to 8275fe9 Compare July 3, 2025 16:09
Copy link

cloudflare-workers-and-pages bot commented Jul 3, 2025

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3bc3db1
Status: ✅  Deploy successful!
Preview URL: https://c20be523.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://quenting-backchannel-logout.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose force-pushed the quenting/backchannel-logout/record-id-token-claims branch 2 times, most recently from 4aa593f to 0e5c964 Compare July 4, 2025 10:53
@sandhose sandhose changed the title WIP: backchannel logout Support receiving OpenID Connect Back-Channel Logout notifications Jul 4, 2025
@sandhose sandhose added A-Upstream-OAuth Related to login via upstream OAuth 2.0 providers T-Enhancement New feature of request labels Jul 4, 2025
@sandhose sandhose requested a review from reivilibre July 4, 2025 14:16
@sandhose sandhose marked this pull request as ready for review July 4, 2025 14:16
@sandhose sandhose marked this pull request as draft July 4, 2025 14:19
@sandhose sandhose force-pushed the quenting/backchannel-logout/record-id-token-claims branch from fa123aa to 3bc3db1 Compare July 4, 2025 14:27
@sandhose sandhose marked this pull request as ready for review July 4, 2025 14:27
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semantics/opinions on desirable behaviour themselves seem messy, but as an implementation of what it says it will implement, this seems correct and reasonable

@sandhose sandhose merged commit 3688482 into main Jul 7, 2025
20 checks passed
@sandhose sandhose deleted the quenting/backchannel-logout/record-id-token-claims branch July 7, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Upstream-OAuth Related to login via upstream OAuth 2.0 providers T-Enhancement New feature of request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support receiving backchannel logout notifications

2 participants