Sign out everywhere: SAML SLO + Shared Signals/CAEP transmitter for session revocation and claims-change

オープン
#348 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
ruby

調査の方向性

Start by reading the listed SSF/CAEP, SAML Single Logout, and OIDC Back-Channel Logout specifications, then inspect the existing Doorkeeper token revocation and SAML/OIDC entry points. The issue gives no file paths or tests, so first map how account ban, lock, deactivation, and directory membership changes are handled. Done means implementing the outlined session tracking and revocation flows across protocols, including receiver management and per-SP outcomes.

索引モデルが issue の本文から書いたものです。

説明

enhancement

what

when a user is banned, locked, or loses group membership, apps they're signed into don't find out until their token or session expires. we can revoke our own doorkeeper tokens, but we have no way to tell an app "this session is over" or "this user's claims changed" across both SAML and OIDC.

there is now a unified, protocol-agnostic spec for exactly this: OpenID Shared Signals Framework (SSF) + CAEP, approved as final specifications on 2025-09-02. as of late 2026 it's in production at Okta, Entra ID, and Google, and Keycloak has an experimental transmitter behind a flag.

how it works

we'd be an SSF transmitter. apps that care register as receivers (push to a webhook, or poll). we emit Security Event Tokens (signed JWTs, RFC 8417). the events name the subject (user), not a specific token or protocol, so one event covers SAML sessions and OIDC tokens alike. the receiver maps the subject to whatever sessions it holds.

the two CAEP events we'd emit first:

  • session-revoked — ban, lock, deactivation, admin "sign them out everywhere." carries initiating_entity (admin / policy / user).
  • token-claims-change — the user's claims changed mid-session. this is exactly the directory-services case: group/entitlement membership changed, so an app that received groups: [...] should re-evaluate. the directory rebuild already produces a per-person diff of effective memberships; each row of that diff is one of these events for every app told about the affected entitlement.

what it replaces / complements

mechanism scope status
OIDC back-channel logout OIDC only, logout only, per-client backchannel_logout_uri stable, low RP adoption
SAML Single Logout SAML only, logout only, needs SP support + session index stable, flaky in the wild, and we need it anyway (see below)
doorkeeper token revocation our own access/refresh tokens we can do this today
SSF/CAEP both protocols, logout and claims change, subject-addressed final spec 2025-09; big-vendor production
Global Token Revocation (draft-parecki) the inbound direction: an external party tells an AS to revoke everything for a user individual I-D, expired 2026-08; not WG-adopted

Global Token Revocation is the complement: a single endpoint on us that a SIEM or upstream IdP can hit to kill all of a user's tokens. simple, but the draft has lapsed; worth implementing the shape of it anyway as an internal admin endpoint.

SAML Single Logout is required, not optional

SSF only helps SPs that implement a receiver. the SAML SPs we federate to today (slack grid, airtable, etc.) will not; what they do implement is SAML SLO. so SLO is the SAML half of "sign out everywhere" for the foreseeable future, and it ships alongside or before SSF.

what we need:

  • track SP sessions. on every successful assertion, record (identity, sp slug, SessionIndex, NameID, issued_at). the SessionIndex is what the SP keys its session on; without it, our LogoutRequest is a no-op at most SPs.
  • IdP-initiated SLO. on ban / lock / deactivate / admin sign-out / user "sign out everywhere": for every live SP session, send a signed LogoutRequest (NameID + SessionIndex) to the SP's SLO endpoint. HTTP-Redirect or HTTP-POST binding need a browser, so from a background job we need the SOAP binding where the SP supports it, and must fall back to "best effort, mark as unconfirmed" where it doesn't. record the LogoutResponse status per SP.
  • SP-initiated SLO. accept a LogoutRequest from an SP at our SLO endpoint, end our session, and propagate to the other SPs the user is signed into, then return a LogoutResponse to the initiator. this is the front-channel chain that's famously fragile (one SP that doesn't respond breaks the chain); do it in an iframe-per-SP or sequential-redirect with a timeout and a "partial logout" result page rather than pretending it's atomic.
  • metadata. advertise SingleLogoutService in our IdP metadata; parse the SP's SLO endpoints and bindings from theirs; per-SP config flag for "supports SOAP SLO" since metadata lies.
  • tie-in. the same trigger list as session-revoked drives SLO. one Sessions::RevokeEverywhere service fans out to: doorkeeper revocation, SAML SLO, SSF session-revoked, OIDC back-channel logout for any RP that registered a backchannel_logout_uri.

OIDC back-channel logout is the OIDC sibling of SLO and is cheap once SSF SET signing exists (a logout token is the same shape), so it rides along with the SSF work.

rough scope

  1. SET signing + a transmitter config endpoint (/.well-known/ssf-configuration), stream management (receivers register, choose push or poll).
  2. emit session-revoked on ban / lock / deactivate / admin sign-out.
  3. emit token-claims-change from the directory membership diff, fan out to apps with an app_groups row on the affected entitlement.
  4. do the cheap thing immediately regardless of SSF: revoke doorkeeper tokens for (user, app) on the same triggers. SSF is how we tell the app; revocation is how we stop the tokens working.
  5. SAML SLO (session tracking, IdP-initiated via SOAP where possible, SP-initiated chain, metadata) — required for the SAML SPs that will never run an SSF receiver.
  6. OIDC back-channel logout for RPs that register a backchannel_logout_uri, reusing the SET signer.

receivers in our ecosystem will be few at first; the value is that it's one mechanism for both protocols and the shape won't change under us.

refs

主要言語
Ruby
スター
85
フォーク
72
平均マージ
3日 12時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hackclub/auth のほかの issue

hackclub/auth の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。