Yicong-Huang opened a new pull request, #5560:
URL: https://github.com/apache/texera/pull/5560

   ### What changes were proposed in this PR?
   
   In `AccessControlResource`, when `SecurityContext.getUserPrincipal` is 
already a `SessionUser` populated by `JwtAuthFilter` (the Authorization-header 
path), reuse it instead of calling `JwtParser.parseToken` on the same token 
again. Falls back to parsing the query/body token only when no principal is 
available, preserving WebSocket (`?access-token=`) and form-POST (body `token`) 
flows that the filter does not see.
   
   ### Why are the changes needed?
   
   Related issues: Closes #5559
   
   ### How was this PR tested?
   
   Added unit test covering the SecurityContext-reuse path; existing 
`AccessControlResourceSpec` cases continue to exercise the query/body fallback.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 4.7


-- 
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