smallrye-jwt icon indicating copy to clipboard operation
smallrye-jwt copied to clipboard

request: smallrye-jwt retries fetching keys if initial request fails

Open The-Funk opened this issue 1 year ago • 3 comments

Describe the bug smallrye-jwt seems to fetch keys from the OAuth provider's key endpoint only on first request, however if this original fetch fails, the library never retries, and all subsequent auth requests fail until the application is restarted.

Expected behavior If there's a network blip on the first request and the application is unable to fetch proper keys, the library should retry fetching the keys on each successive auth request, or on a scheduled retry with some backoff, or on 1 in X number of subsequent requests (in case there are many requests).

Actual behavior See bug description.

How to Reproduce? Start an application with smallrye-jwt and with your OAuth provider firewalled and inaccessible or unrouteable. Once the startup process has fully completed, try authenticating (the request will fail). Re-establish connectivity between the application and the OAuth provider. Attempt authentication again. Tthe request will still fail despite the OAuth provider being available once again.

The-Funk avatar Mar 27 '24 13:03 The-Funk

I've noticed this too

benrose258 avatar May 01 '24 18:05 benrose258

I have noticed bugs concerning this issue.

tsbudd avatar May 13 '24 13:05 tsbudd