[
https://issues.apache.org/jira/browse/TOMEE-4682?focusedWorklogId=1037563&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1037563
]
ASF GitHub Bot logged work on TOMEE-4682:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Aug/26 16:46
Start Date: 24/Aug/26 16:46
Worklog Time Spent: 10m
Work Description: exabrial commented on PR #2902:
URL: https://github.com/apache/tomee/pull/2902#issuecomment-5398416206
Hey Jonathan! Excellent patch! I did some local testing and found a couple
of areas that are tangentially related:
* `@LoginToContinue` produces sessions 100% of the time, when it should
really just produce one when redirecting to login. So if accessing a
non-protected resource -> don't create a session. If accessing one -> create a
session to save the request
* Speaking of the request; the saved request to be replayed isn't getting
fully replayed.
I'll get these pushed to an additional PR in a few mins
Issue Time Tracking
-------------------
Worklog Id: (was: 1037563)
Time Spent: 0.5h (was: 20m)
> 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: 0.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)