I'm using "Zuul" as an api gateway for my spring boot based api microservices. I have also implemented a standalone "Auth Server" for JWT token creation and validation.
What I'm trying to achieve is "Zuul" calling the "Auth Server" for token validation before allowing the requests to go to any service.
So basic flow will be like on below
- Zuul will be serving as only Gateway purposes
- When it comes to JWT validation "Zuul" will ask to "Auth Server" if token is valid or not
- If it is valid then "Downstream Routing" will be proceeded by Zuul. If not than request will be rejected as usual
Due to speed, latency concerns I'm looking for a smart way of doing this. There is bunch of examples based on "Zuul Pre Filtering before Downstream Microservice routing". And it is hard to figure out which one is the better approach for my case. Apart from custom approaches is there any standart way of doing this?
Below is the best example I have found so far. Due to my lack of experience, I really don't know if this architecture is a good option to continue.
https://github.com/spring-cloud/spring-cloud-netflix/issues/1392#issuecomment-253267241