feat: soft-refresh immutable UserDetails without mass session kick#24490
Closed
netroms wants to merge 1 commit into
Closed
feat: soft-refresh immutable UserDetails without mass session kick#24490netroms wants to merge 1 commit into
netroms wants to merge 1 commit into
Conversation
Replace role/group/OU-driven SessionRegistry mass invalidation with dual generation stamps (user + role) and a shared AuthzService. Role authority or restriction edits bump one role gen (O(1)). Form/OIDC sessions rebuild and replace Authentication on next request via UserDetailsSoftRefreshFilter with explicit SecurityContext save. JWT/PAT share AuthzService. Password, disable, lock, expiry remain hard invalidate.
|
4 tasks
Contributor
Author
|
Superseded by #24493 (v2 of the same approach: repository decoration instead of a filter, epoch+gen store, Postgres-only SQL with test coverage moved to Postgres ITs). |
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.


Summary
SessionRegistry.expireNowwith dual generation stamps (userAuthzGen+roleAuthzGen) and a sharedAuthzService.UserDetailson the next request viaUserDetailsSoftRefreshFilter(explicitSecurityContextsave, no logout).AuthzService; password / disable / lock / expiry remain hard invalidate.Design note:
docs/design/2026-07-18-userdetails-soft-refresh.mdRelated: PR #24477 only batches N+1 lookups and does not change semantics. This PR changes the authz-invalidation model.
Test plan
InMemoryAuthzVersionStoreTest,DefaultAuthzServiceTest(8)UserDetailsSoftRefreshFilterTest(3)