You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like this library suffers a small race condition, when an IDP uses rolling keys. Under circumstances the validation of an JWT/JWK fails the first time.
Reproduction
Use a JWKS Caching Provider with an OIDC conformant IDP
Validate a JWT with this library and with a valid JWK -> works fine
Wait until the IDP invalidates the current JWK
Validate another JWT with the new JWK --> May fail with the error that the JWK type is not supported
Go JWT Middleware version
2.2.1
Go version
1.23
The text was updated successfully, but these errors were encountered:
jofleck
added
the
bug
This issue reports a suspect bug or issue with the SDK itself
label
Oct 17, 2024
The commit history of the caching function says that refreshing in the "background" is done intentionally rather than blocking until the keys are refreshed. But this can lead to the misbehavior I mentioned before :)
Checklist
Description
It seems like this library suffers a small race condition, when an IDP uses rolling keys. Under circumstances the validation of an JWT/JWK fails the first time.
Reproduction
Go JWT Middleware version
2.2.1
Go version
1.23
The text was updated successfully, but these errors were encountered: