There are a lot of cases when it is necessary to use the SecurityContext in async mesage flow inside Web application.
The principal is appeared in HttpRequest from springSecurityFilterChain and stored in the ThreadLocal holder.
So, at first, I propose to add supoprt of some global ChannelInterceptor which can propagetes that securityContext to async mesasge flow.
This is my solution. Sorry for Groovy code.
In this case the end-programmer can use
As well as always in any place of his application.