apigee / istio-mixer-adapter

Apigee's Istio Mixer Adapter
Apache License 2.0
53 stars 22 forks source link

Do not consider API Key JWT expiration when disconnected #303

Closed theganyo closed 4 years ago

theganyo commented 4 years ago

Current behavior is for API Keys to be internally be converted to JWT's that expire after 15 minutes at which point they must be renewed. Instead, API Keys should continue to operate despite JWT expiration when the adapter is disconnected from Apigee.

theganyo commented 4 years ago

Basically, it's going to look something like this:

  1. When an API Key check comes in, check a LRU cache.
  2. If token is cached, initiate background check if token is expired, return cached token.
  3. If token is not cached, check bad token cache, return invalid if present.
  4. If token is in neither cache, make a synchronous request to Apigee to refresh it. Update good and bad caches.