Replies: 1 comment
-
Can anyone help out? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Im trying to implement ChatClient with stream and SSE for a chat bot SPA client but I hit a road block with my JWT authentication. Everything works fine with blocking requests and ChatClient but as soon as I switch to Flux/SSE endpoint my AuditAware implementation does not "see" my Authentication object and its null.
This happens when my ChatMemory implementation is persisting user and assistant messages in a table and audit aware impl is trying to fetch the user Id first but the SecurityContext is empty
I have tried to propagate SecurityContext into contextWrite() for the method chaining of ChatClient but still no luck. Logs shows that the request message rans in a loomBoundedElastic-1 thread and when the response returns from the LLM the thread changes to loomBoundedElastic-140.
If I add SecurityContextStrategy to inheritable the first loomBoundedElastic-1 works but not the second when the LLM response returns
Does anyone have an idea how can I properly propagate the Authentication into a reactive?
Beta Was this translation helpful? Give feedback.
All reactions