Skip to content

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

@The-Funk

Description

@The-Funk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions