My web application uses a pre-authentication method. By the time that the request reaches my application, userPrincipal is correctly set.
I know it’s not using Java EE container security, it is using some module configured on the Apache web server.
Therefore, I’m unsure what pre-authetication method to use. Ideally I want something similar to the RequestHeaderAuthenticationFilter except that it just reads the userPrincipal from the request instead of the header.
Is there an out of the box mechanism to achieve this?
Just extend and then register
AbstractPreAuthenticatedProcessingFilter, everything is in documentation:and in security-context.xml: