Reputation: 9
I read the really interesting articles:
http://stytex.de/blog/2016/03/25/jhipster3-microservice-tutorial/ http://stytex.de/blog/2016/09/15/jhipster-3-dot-7-secure-service-communication/
My question is: how can I implement secure service-to-service communication in an application generated using JWT?
I suppose AuthorizedFeignClient annotation is only available for applications generated using OAuth2.
Thanks, Mic
Upvotes: 0
Views: 370
Reputation: 3145
It depends on how strict you see "service-to-service" communication.
Then you can use @AuthorizedUserFeignClient
to enable token forwarding. Here the first microservice act as the user when making requests to the second microservice.
In certain situations, you want to have different access control rules, when a request is done by a microservice, not user.
This problem is not trivial and one of the core use cases for the OAuth2 way of microservice security.
Upvotes: 1