You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "coder999o (via GitHub)" <gi...@apache.org> on 2026/09/23 14:57:52 UTC

[PR] fix(studio): clear auth context on forbidden requests [rocketmq-dashboard]

coder999o opened a new pull request, #5051:
URL: https://github.com/apache/rocketmq-dashboard/pull/5051

   ## What is the purpose of the change
   
   Clear `AuthenticatedUserContext` when `AuthInterceptor` rejects an authenticated non-admin request with `403`.
   
   The interceptor sets the per-thread user context before checking admin-only routes. When `preHandle` returns `false` for a forbidden request, the request is blocked before controller execution, so this path should clean the context before returning.
   
   ## Brief changelog
   
   - Clear `AuthenticatedUserContext` before returning forbidden for non-admin admin-only requests.
   - Add a regression assertion for the rejected mutating request path.
   
   ## Verifying this change
   
   - `git diff --check`
   - `cd server && mvn -Dtest=AuthInterceptorTest test`


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(studio): clear auth context on forbidden requests [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #5051:
URL: https://github.com/apache/rocketmq-dashboard/pull/5051


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org