You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When user switching is configured insecurely (allowing switching from an anonymous user), Actuator's AuthenticationAuditListener will NPE when exiting the switch #15767
Our application has an anonymous landing page that allows one to impersonate multiple users. The first impersonation works, the second in the same session fails because of an NPE.
SwitchUserFilter tries to exit the impersonated user before doing the next impersonation. As the previous user is anonymous the originalUser will be NULL (SwitchUserFilter:284 is not executed as obj is a string with value "anonymousUser") and as such the
audit listener fails with an NPE (AuthenticationAuditListener:106).
This is using spring-boot 1.5.7 and corresponding spring-security 4.2.3 but looking at the code this is still there in the latest 1.5.18 release.
A potential workaround is to have no audit listener, or a custom one.