Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evict the cache if the JWKS change #5

Closed
mcollina opened this issue Jan 29, 2020 · 4 comments · Fixed by #12
Closed

Evict the cache if the JWKS change #5

mcollina opened this issue Jan 29, 2020 · 4 comments · Fixed by #12

Comments

@mcollina
Copy link
Contributor

@panva says

what if the keys i resolve are coming from a remote JWKS uri, a key drops out, i shouldn't accept those tokens anymore, regardless of their exp.

@ShogunPanda
Copy link
Contributor

This makes the entire cache useless. Because in order to verify if the token is still valid I need to hit the URL with the JWKS.
I think it's better to outline this in the README instead so that the users can disable the caching layer if they think keys can be evicted before token expirations.

@ShogunPanda
Copy link
Contributor

Additionally, we can probably fix this if we implement the second approach @dgonzalez suggested in #8

@mcollina
Copy link
Contributor Author

mcollina commented Jan 31, 2020 via email

@ShogunPanda
Copy link
Contributor

In order to mitigate this, I've added a cacheTTL option which defaults to 10 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants