Is it a good practice to validate authorization at micro service level again when we have already authorized at API Gateway level.?

Viewed 226

We are trying to come up with a microservice Architecture where we need to identify whether its a good practice to implement authorization at micro service level when we have already done that gateway level. We are using KONG as API Gateway which will interact with KeyCloak for Authorization. After the Authorization is successful, is it really correct to apply a global filter at the resource level that will verify the JWT token passed inside the header. May be performance can take a hit but I am not sure if that is correct.

1 Answers

Ideally microservices should be accessible through API Gateway only. If that is the case in your scenario, then there no need to do authentication validation again.

Related