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
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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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