Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(OP): add back channel logout support #671

Merged
merged 11 commits into from
Oct 30, 2024
Merged

Conversation

livio-a
Copy link
Member

@livio-a livio-a commented Oct 29, 2024

Adds basic back channel logout support for an OP by adding backchannel_logout_supported and backchannel_logout_session_supported to the discovery endpoint, LogoutTokenClaims to be signed.

closes #642

Definition of Ready

  • I am happy with the code
  • Short description of the feature/issue is added in the pr description
  • PR is linked to the corresponding user story
  • Acceptance criteria are met
  • All open todos and follow ups are defined in a new ticket and justified
  • Deviations from the acceptance criteria and design are agreed with the PO and documented.
  • No debug or dead code
  • My code has no repetitions
  • Critical parts are tested automatically
  • Where possible E2E tests are implemented
  • Documentation/examples are up-to-date
  • All non-functional requirements are met
  • Functionality of the acceptance criteria is checked manually on the dev system.

@livio-a livio-a requested a review from muhlemmer October 29, 2024 07:21
@livio-a livio-a enabled auto-merge (squash) October 29, 2024 07:22
@mffap
Copy link
Member

mffap commented Oct 29, 2024

@livio-a @muhlemmer can we add this to the list of features on the readme?

@livio-a
Copy link
Member Author

livio-a commented Oct 29, 2024

@livio-a @muhlemmer can we add this to the list of features on the readme?

you noticed that really fast 🏎️💨
it's now updated

@livio-a livio-a merged commit f1e4cb2 into main Oct 30, 2024
5 checks passed
@livio-a livio-a deleted the back-channel-support branch October 30, 2024 08:44
Copy link

🎉 This PR is included in version 3.32.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

livio-a added a commit to zitadel/zitadel that referenced this pull request Oct 31, 2024
# Which Problems Are Solved

Currently ZITADEL supports RP-initiated logout for clients. Back-channel
logout ensures that user sessions are terminated across all connected
applications, even if the user closes their browser or loses
connectivity providing a more secure alternative for certain use cases.

# How the Problems Are Solved

If the feature is activated and the client used for the authentication
has a back_channel_logout_uri configured, a
`session_logout.back_channel` will be registered. Once a user terminates
their session, a (notification) handler will send a SET (form POST) to
the registered uri containing a logout_token (with the user's ID and
session ID).

- A new feature "back_channel_logout" is added on system and instance
level
- A `back_channel_logout_uri` can be managed on OIDC applications
- Added a `session_logout` aggregate to register and inform about sent
`back_channel` notifications
- Added a `SecurityEventToken` channel and `Form`message type in the
notification handlers
- Added `TriggeredAtOrigin` fields to `HumanSignedOut` and
`TerminateSession` events for notification handling
- Exported various functions and types in the `oidc` package to be able
to reuse for token signing in the back_channel notifier.
- To prevent that current existing session termination events will be
handled, a setup step is added to set the `current_states` for the
`projections.notifications_back_channel_logout` to the current position

- [x] requires zitadel/oidc#671

# Additional Changes

- Updated all OTEL dependencies to v1.29.0, since OIDC already updated
some of them to that version.
- Single Session Termination feature is correctly checked (fixed feature
mapping)

# Additional Context

- closes #8467
- TODO:
  - Documentation
  - UI to be done: #8469

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Back-channel logout support
3 participants