Describe the bug After upgrading from Spring Security 5.6.1 to Spring Security 6.2.2 the DelegatingSecurityContextAsyncTaskExecutor doesn't work as it did before. Now we get a null SecurityContext inside @Async methods. After digging a bit deeper we found the DelegatingSecurityContextCallable which now also has a securityContextHolderStrategy. As it did before, it sets the delegateSecurityContext to SecurityContextHolder.getContext() (the correct one) but now right afterwards it overwrites the field again with securityContextHolderStrategy.getContext() (a null SecurityContext).

Expected behavior I'd expect it to work as before and defaulting to SecurityContextHolder.getContext().

The only thing I can do right now is do some hacky stuff with a ContextCopyingDecorator (see https://stackoverflow.com/questions/5246428/spring-security-and-async-authenticated-users-mixed-up) or implementing a custom SecurityContextHolderStrategy and passing it to the DelegatingSecurityContextAsyncTaskExecutor. This doesn't seem right.