We are trying to implement the authentication options outlined here:
https://cloud.google.com/endpoints/docs/authenticating-users
We are using Cloud Endpoints V2 and NOT implementing it using AppEngine, but rather through Container Engine with our own containers/pods.
If our understanding is correct, the flow is something like:
- User logs into app, let's say using auth2.com - a JWT Token is returned
- User calls a microservice endpoint passing the JWT Token
- The ESP validates the JWT Token using the endpoint defined - in this case it makes a call to auth2.com to verify the request
- If token is valid, request is proxied to backend server
Our question is - is our understanding correct? If so, does the ESP employ ANY form of caching, or does it validate each and every request through the proxy with auth2.com/authentication provider? If so, it seems that this would significantly increase throughput as one additional network request is added to every request.
Thanks in advance.