Sign out everywhere: SAML SLO + Shared Signals/CAEP transmitter for session revocation and claims-change
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ruby
- Lĩnh vực
- authentication, backend, security
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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." carriesinitiating_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 receivedgroups: [...]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). theSessionIndexis 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 theLogoutResponsestatus per SP. - SP-initiated SLO. accept a
LogoutRequestfrom an SP at our SLO endpoint, end our session, and propagate to the other SPs the user is signed into, then return aLogoutResponseto 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
SingleLogoutServicein 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-revokeddrives SLO. oneSessions::RevokeEverywhereservice fans out to: doorkeeper revocation, SAML SLO, SSFsession-revoked, OIDC back-channel logout for any RP that registered abackchannel_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
- SET signing + a
transmitterconfig endpoint (/.well-known/ssf-configuration), stream management (receivers register, choose push or poll). - emit
session-revokedon ban / lock / deactivate / admin sign-out. - emit
token-claims-changefrom the directory membership diff, fan out to apps with anapp_groupsrow on the affected entitlement. - 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.
- 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.
- 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
- SSF 1.0 final: https://openid.net/specs/openid-sharedsignals-framework-1_0-final.html
- CAEP 1.0 final: https://openid.net/specs/openid-caep-1_0-final.html
- RISC 1.0 final (account-level events like
account-disabled): https://openid.net/specs/openid-risc-1_0-final.html - CAEP interoperability profile (implementer's draft, final expected 2026): https://openid.net/wg/sharedsignals/specifications/
- SAML 2.0 Profiles, Single Logout Profile (§4.4): https://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf
- OIDC Back-Channel Logout 1.0: https://openid.net/specs/openid-connect-backchannel-1_0.html
- Global Token Revocation draft: https://datatracker.ietf.org/doc/draft-parecki-oauth-global-token-revocation/
- Keycloak's experimental SSF transmitter, for a reference implementation shape: https://skycloak.io/blog/keycloak-caep-shared-signals-continuous-access/
- Ngôn ngữ chính
- Ruby
- Star
- 85
- Fork
- 72
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hackclub/auth
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hackclub/auth
Issue tương tự
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
ruby/securerandom#92 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
open-feature/ruby-sdk-contrib#340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zold-io/wts.zold.io#651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
erkamyaman/rust-anything#788 ·
Maintainer thường phản hồi trong vòng 1 ngày