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

Question About JWKS Auto-Refresh Removal in v3 #101

Closed
sc-tomer opened this issue Jan 5, 2024 · 4 comments
Closed

Question About JWKS Auto-Refresh Removal in v3 #101

sc-tomer opened this issue Jan 5, 2024 · 4 comments

Comments

@sc-tomer
Copy link

sc-tomer commented Jan 5, 2024

Hey, I noticed in v3 the auto-refresh for JWKS when a KID is missing got removed. It was super useful for key rotations.
Just curious, what's the reason behind this change?

Really appreciate the work you've put into this package. It's been a huge help!

@MicahParks
Copy link
Owner

MicahParks commented Jan 5, 2024

I know this is a question and not a request, but I plan on starting a native implementation that mimics the old "refresh on unknown kid" behavior tomorrow. It seems I may have miscalculated it's utility for other people's use cases.

The reason that feature is no longer supported natively is the specific behavior I designed it for added a large amount of complexity to the project.

The key rotation strategy for the projects I run do not benefit from that feature. New keys are added with a long delay before they are used. When working on the newer jwkset package, I didn't reimplement the feature because I assumed there were few use cases for it.

Since it seems your use case can benefit from the old "refresh on unknown kid" behavior, it is likely that me not including this feature natively in V3 affected more than your use case.

This feature can be re-implemented using a custom jwkset client. My plan is to start writing an implementation tomorrow, then publish it to the jwkset project and document it here in the keyfunc project.

Thank you for your feedback!

@MicahParks
Copy link
Owner

MicahParks commented Jan 7, 2024

Here's my pull request. Anyone is welcome to take a look.

@sc-tomer, how does this look to you?

MicahParks/jwkset#13

@sc-tomer
Copy link
Author

sc-tomer commented Jan 8, 2024

That's perfect! I can't thank you enough.
PR looks great.

@MicahParks
Copy link
Owner

Closing due to release of v3.2.2.

https://github.com/MicahParks/keyfunc/releases/tag/3.2.2

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

No branches or pull requests

2 participants