Pale Blue Dot
Pale Blue Dot

Reputation: 591

Implement security only at ZUUL Gateway

I have the below microservice architecture(spring boot ,java). I want to implement OAUTH2 JWT security at ZUUL gateway only and not replicate the security code in microservices . let say Microservice 1 has rest end point http://localhost:8080/microservice-1/get/person then i should not have any security code in Microservice 1 but still at the same time no one should be able to access the Microservice 1 rest end point directly without passing JWT tokens but it should only be accessible via ZUUL.

enter image description here

Upvotes: 0

Views: 1002

Answers (1)

David Leonardo Bernal
David Leonardo Bernal

Reputation: 61

You can use WebSecurityConfigurerAdapter class in your Zuul gateway and configure the security for each route.

This is an excellent example for you

https://medium.com/@bharatrajmeriyala/spring-cloud-security-with-netflix-zuul-2ef04a1dcfb

Upvotes: 0

Related Questions