I have to convert a Project Reactor Mono/Flux to a Kotlin Flow in a Spring Boot controller.
The problem is that Spring Boot puts the Security Context on the final reactive chain, which means in my case on the Flow. Given that the context propagates upstream and I originally had a Flux, the Flux does not have knowledge of that Security Context, which is a big problem for me.
That might not sound very clear, really confusing for me, here is a link to the corresponding Stack Overflow post, and to the sample project I created, showcasing the problem:
Thanks in advance for the help!