Checklist
Description
This PR introduces caching outside of the configurable JWK cache, causing unexpected (potentially insecure) behavior.
Example JWK removed from JWKS endpoint.
Reproduction
- Build provider using jwks endpoint where keyid "a" is listed
a. var provider = new JwkProviderBuilder(new URL("jwks url")).cached(false).build()
- Get the key
a. provider.get("a");
- Remove the key from the jwks endpoint
- Get the key
a. provider.get("a");
b. This shouldn't return the key but does
c. The key will never stop being found, until a different key id (that wasn't there during step 3.a) is requested from the provider.
Additional context
No response
jwks-rsa version
0.23.0
Java version
17
Checklist
Description
This PR introduces caching outside of the configurable JWK cache, causing unexpected (potentially insecure) behavior.
Example JWK removed from JWKS endpoint.
Reproduction
a.
var provider = new JwkProviderBuilder(new URL("jwks url")).cached(false).build()a.
provider.get("a");a.
provider.get("a");b. This shouldn't return the key but does
c. The key will never stop being found, until a different key id (that wasn't there during step 3.a) is requested from the provider.
Additional context
No response
jwks-rsa version
0.23.0
Java version
17