[ISSUE #2892] Fix duplicate authentication session resolution - #2895
Merged
Conversation
RockteMQ-AI
approved these changes
Sep 1, 2026
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
[ISSUE #2892] Fix duplicate authentication session resolution
Clean fix with proper deduplication guard and regression test coverage. No blocking issues.
Automated review by github-manager-bot
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
lizhimins
force-pushed
the
0901-yuluo-yx/fix-1
branch
from
September 4, 2026 07:22
cd56022 to
7326798
Compare
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.
What changed\n\n- resolve the authenticated user exactly once in AuthInterceptor\n- reject an empty user snapshot before populating request context\n- reuse the same user snapshot for reader/admin authorization\n- add a regression that verifies one session resolution per request\n\n## Why\n\nAuthService.isAuthenticated delegates to getAuthenticatedUser. Calling both methods caused two database-backed session resolutions for every protected request and left a revocation race between authentication and context population.\n\n## Verification\n\n- mise exec java@temurin-21 -- mvn -q -Dtest=AuthInterceptorTest test\n- scope check: 2 files, 45 changed lines\n\nFixes #2892