Skip to content

[ISSUE #2892] Fix duplicate authentication session resolution - #2895

Merged
lizhimins merged 1 commit into
apache:rocketmq-studiofrom
yuluo-yx:0901-yuluo-yx/fix-1
Sep 4, 2026
Merged

[ISSUE #2892] Fix duplicate authentication session resolution#2895
lizhimins merged 1 commit into
apache:rocketmq-studiofrom
yuluo-yx:0901-yuluo-yx/fix-1

Conversation

@yuluo-yx

@yuluo-yx yuluo-yx commented Sep 1, 2026

Copy link
Copy Markdown
Member

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

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants