Repository navigation
fix: Send back-channel logout from expired session cleanup - #142
Merged
patchandthat merged 3 commits intoOct 29, 2026
Merged
patchandthat merged 3 commits into
patchandthat merged 3 commits into
Conversation
oleks9o6
marked this pull request as ready for review
October 28, 2026 13:11
oleks9o6
marked this pull request as draft
October 28, 2026 13:12
Collaborator
|
@oleks9o6 The PR is marked as draft, is that accidental? |
Contributor
Author
@patchandthat Not accidental: it builds on #140 and includes its three commits, so I kept it as a draft until #140 is merged. It’s ready otherwise. |
Collaborator
|
As this is a bugfix and non-breaking, I'd like to do a patch release soon with this in (& other bugfixes) but not #140. Is it possible to reorder them? |
Contributor
Author
Sure, I'll do that. |
Collaborator
|
Great, thank you. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oleks9o6
force-pushed
the
fix/134-backchannel-logout-issuer
branch
from
October 29, 2026 12:13
5c3304f to
74ea1cd
Compare
oleks9o6
marked this pull request as ready for review
October 29, 2026 12:13
patchandthat
approved these changes
Oct 29, 2026
2 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Back-channel logout notifications sent by the expired session cleanup now get their issuer from the session, so they no longer need an
HttpContext.SessionCleanupServiceruns without a request.DefaultBackChannelLogoutServiceread the issuer fromHttpContext, threw, and the cleanup caught and logged the exception, so the clients in that batch were never notified. The issuer is already stored with the session, so it now travels throughEndUserSessionEventContext,LogoutNotificationContextandBackChannelLogoutRequest(theIssuernames match Duende). The token usesrequest.Issuerwhen it is set and falls back to the current request otherwise, so end session is unchanged.DefaultSessionManagementService.RemoveSessionsAsyncpasses the session issuer too, since it can also run outside a request.Closes #134
Type of change
Does this PR introduce a breaking change?
Does the change cause a breaking change to any of the following?
Adds an
Issuerproperty toLogoutNotificationContext,BackChannelLogoutRequestandEndUserSessionEventContext.Testing
Unit tests cover each step the issuer passes through. A new integration test runs the expired session cleanup outside a request and checks the
issof the posted logout token; without the fix no token is posted. The existing end session tests cover the fallback. The full unit and integration suites pass.LLM Usage
The
src/changes are written by me. The tests were drafted with Claude and reviewed by me.Other context
Based on
main, so it can go into a patch release without #140. #140 changes the same lines at the end ofDefaultBackChannelLogoutService.CreateTokenAsync, so I'll update #140 once this is merged.RemoveSessionsAsynccalled inside a request now uses the session's issuer rather than the current request's. They differ only when the session was created on another host or beforeIssuerUrichanged, and then the session's issuer is the one the client knows.🤖 Generated with Claude Code