youngkermit8-coder opened a new pull request, #2381:
URL: https://github.com/apache/rocketmq-dashboard/pull/2381

   ## Summary
   
   - resolve the authenticated user once in `AuthInterceptor`
   - reuse the same user snapshot for authentication, request context, and 
admin authorization
   - update authorization integration fixtures to exercise the 
single-resolution flow
   - add a regression that rejects extra authentication and role lookups within 
one request
   
   ## Root cause and impact
   
   The interceptor previously called `isAuthenticated`, `getAuthenticatedUser`, 
and, for admin-only routes, `isAdmin`. Both helper methods delegate to 
`getAuthenticatedUser`, so persistent authentication selected the session and 
user twice for reader requests and three times for admin requests. That meant 
four to six authentication SELECTs before controller work began and allowed one 
request to evaluate multiple database snapshots.
   
   The interceptor now resolves `LoginVO.UserInfo` once and uses it for all 
three decisions without changing the existing 401/403 policy or request actor 
context.
   
   ## Validation
   
   - the new single-resolution regression failed on the unmodified base because 
`isAuthenticated` was invoked
   - authentication interceptor and authorization integration tests: 51 passed
   - full Maven suite: 1,355 tests passed, 0 failures/errors/skips
   - Checkstyle: 0 violations
   - `git diff --check`: passed
   
   Fixes #2380
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to