okta / okta-jwt-verifier-js

okta-jwt-verifier-js
https://github.com/okta/okta-jwt-verifier-js
Other
16 stars 9 forks source link

Expose getKeysInterceptor option and getKeys function availables in jwks-rsa library #42

Closed Gaspar1234 closed 2 months ago

Gaspar1234 commented 5 months ago

Describe the feature request?

Hello Team,

I am currently encountering an issue related to the JWKS endpoint and memory cache. When a pod restarts for any reason, the memory cache is lost, causing us to hit the JWKS endpoint. This is acceptable under normal circumstances, but becomes problematic when pods enter a restart loop, resulting in the memory cache being continuously cleared and the JWKS endpoint being repeatedly called.

This could potentially lead to issues or even a block. To mitigate this, we propose implementing an external cache to store keys, reducing our dependency on the memory cache.

The JWKS-RSA library already has this functionality, as demonstrated here

Additionally, we need access to the getKeys method in the same library to retrieve keys for storage in our external cache.

I hope this clarifies our situation and proposed solution. If it aligns with your understanding, I am prepared to submit a PR for this implementation.

Best Regards.

New or Affected Resource(s)

Provide a documentation link

https://github.com/auth0/node-jwks-rsa/blob/master/EXAMPLES.md#loading-keys-from-local-file-environment-variable-or-other-externals

Additional Information?

No response

jaredperreault-okta commented 2 months ago

@Gaspar1234 Support for getKeysInterceptor was released in 4.0.0