[
https://issues.apache.org/jira/browse/TOMEE-4682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla closed TOMEE-4682.
----------------------------------
Resolution: Fixed
Fixed on main via #2902 (22eb946eb7458cdaab344e61c98a859ef7f871cb), which
includes the follow-up session-creation fixes from #2943. The tomee-10.x
backport is #2903; fixVersion 10.3.0 will be added once it is merged.
> SecurityContext.authenticate() does not persist the session (bypasses
> HttpServletRequest.authenticate())
> --------------------------------------------------------------------------------------------------------
>
> Key: TOMEE-4682
> URL: https://issues.apache.org/jira/browse/TOMEE-4682
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 11.0.0-M1, 10.2.0
> Reporter: Jonathan Gallimore
> Assignee: Jonathan Gallimore
> Priority: Major
> Fix For: 11.0.0, 10.3.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> TomEESecurityContext.authenticate() invokes JASPIC directly via
> ServerAuthContext.validateRequest() instead of delegating to
> HttpServletRequest.authenticate(). This means the Servlet Container
> processing, including the jakarta.servlet.http.registerSession handling that
> @AutoApplySession relies on is not invoked.
> Consequently a caller authenticated by calling theĀ
> SecurityContext.authenticate() API is not persisted to the HTTP session and
> is anonymous on the following request.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)