[
https://issues.apache.org/jira/browse/TOMEE-4729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Markus Jung resolved TOMEE-4729.
--------------------------------
Resolution: Fixed
> MP-JWT security state is not restored for asynchronous requests
> ---------------------------------------------------------------
>
> Key: TOMEE-4729
> URL: https://issues.apache.org/jira/browse/TOMEE-4729
> Project: TomEE
> Issue Type: Bug
> Reporter: Richard Zowalla
> Assignee: Richard Zowalla
> Priority: Major
> Fix For: 11.0.0-M2, 10.3.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> If a request starts asynchronous processing and the bearer token is first
> validated after MPJWTFilter.doFilter has returned \(lazy validation through
> MPJWTServletRequestWrapper\), TomcatSecurityService.enterWebApp pushes the
> caller identity and run\-as subject onto the container thread that runs the
> async work. Nothing calls exitWebApp for it, because the filter's cleanup has
> already run without a saved MP\_JWT\_PRE\_LOGIN\_STATE, so the state can
> remain on a pooled thread \(see the existing TODO in MPJWTFilter about async
> requests\). The state should be restored when the async work completes,
> errors or times out.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)