How to get and set authorization token for calls when Circuit Breaker is enabled?

Viewed 15

When I turn Circuit Breaker on I'm getting authentication problems from my services, because authorization token is not present in headers of request.

I found in the web that Circuit Breaker runs on secondary thread, that doesn't has spring security context.

For hystrix, the solution I found is to use shareSecurityContext=true config option, and implement a request interceptor that get the token and set for request.

But, for resilience4j, I not found a solution.

Thanks for help.

0 Answers
Related