Skip to content

Comments

Fix Concurrent DbContext Access on Back Channel Logout#2019

Merged
bhazen merged 3 commits intomainfrom
beh/logout-notification-current-dbaccess-bug
May 15, 2025
Merged

Fix Concurrent DbContext Access on Back Channel Logout#2019
bhazen merged 3 commits intomainfrom
beh/logout-notification-current-dbaccess-bug

Conversation

@bhazen
Copy link
Contributor

@bhazen bhazen commented May 14, 2025

What issue does this PR address?
Fixed issue where concurrent access to a DbContext can happen on back channel logout when multiple clients are tied to a session by making the DbContext access sequential and keeping the outgoing HTTP requests parallel.

Important: Any code or remarks in your Pull Request are under the following terms:

If You provide us with any comments, bug reports, feedback, enhancements, or modifications proposed or suggested by You for the Software, such Feedback is provided on a non-confidential basis (notwithstanding any notice to the contrary You may include in any accompanying communication), and Licensor shall have the right to use such Feedback at its discretion, including, but not limited to the incorporation of such suggested changes into the Software. You hereby grant Licensor a perpetual, irrevocable, transferable, sublicensable, nonexclusive license under all rights necessary to incorporate and use your Feedback for any purpose, including to make and sell any products and services.

(see our license, section 7)

@bhazen bhazen self-assigned this May 14, 2025
@bhazen bhazen added impact/breaking The fix or change will be a breaking one area/products/is IdentityServer labels May 14, 2025
@bhazen bhazen requested a review from josephdecock as a code owner May 14, 2025 17:29
Copy link
Member

@josephdecock josephdecock left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for adding a test that fails reliably too (I see it failing on my machine if I revert the non-test changes).

@bhazen bhazen merged commit 2fdd22c into main May 15, 2025
16 checks passed
@bhazen bhazen deleted the beh/logout-notification-current-dbaccess-bug branch May 15, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/products/is IdentityServer impact/breaking The fix or change will be a breaking one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logout Notifications can result in concurrent access to underlying DbContext

2 participants