Expected Behavior

While using NimbusReactiveJwtDecoder/ReactiveRemoteJWKSource There should be a way to configure a retry mechanism during the process of fetching the JWK info, so in case the provider of the JWK is temporarily unavailable, it could reduce the chance of facing an exception

Current Behavior

While using NimbusReactiveJwtDecoder/ReactiveRemoteJWKSource in case the provider of the JWK info is temporarily unavailable there no retry in place (also not a way to configure it), so the application logic just breaks as this information is required for further processing

Context

  • we have another service which contains the JWK information
  • this service may have some issues, which implies on a short downtime
  • while the service is down, we faced this issue (JWK could not be fetched and the exception was propagated)
  • one idea would be to make it possible to configure timeout for the JWT fetching logic (I can work on it in case you believe it could be a good option, but I am also fine to work on another idea)

Comment From: skjolber

@leosilvadev See also discussion here: https://github.com/spring-projects/spring-security/issues/9646