I am working on microservices application where the client application sends the access token
to orders
microservice with the POST
call. When saving the order, the inventory micro-service should be called to update the inventory. The Inventory microservice updateIntentory
method should also be protected.
In this use case, should I be propagate the same access token
to the inventory
microservice and restrict the api access to update inventory or should I make use of client-credentials
grant flow to allow saveOrder
method in the order
microservice to invoke the updateInventory
method in the inventory microservice
.
Note: Both the order
and inventory
microservices are acting as resource servers.
What is the right approach.