-
Notifications
You must be signed in to change notification settings - Fork 6k
How to increase RemoteJwkSet
timeout?
#10610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@andreas-trvlk Please see the reference doc on how to configure timeouts. I'll close this as answered. |
@jgrandja, I believe you have overlooked the problem reported over here. I think the problem reported over here and also in the linked JHipster issue comes from the below line of code. The current implementation doesn't specify the
Can we extend |
@vishal423 Please see comment. There are no references to
If you link through to the referenced sample code, the solution is provided: @Bean
public JwtDecoder jwtDecoder(RestTemplateBuilder builder) {
RestOperations rest = builder
.setConnectTimeout(Duration.ofSeconds(60))
.setReadTimeout(Duration.ofSeconds(60))
.build();
NimbusJwtDecoder jwtDecoder = NimbusJwtDecoder.withJwkSetUri(jwkSetUri).restOperations(rest).build();
return jwtDecoder;
} |
@jgrandja, In the sample code, you are expected to have |
@vishal423 |
@jgrandja , I feel the default I also tried to write custom |
@vishal423 there are no plans to make the utils class public as it continues to be quite a bit in flux. Perhaps you'd be interested in #10309. |
@vishal423 Did you find the solution? I am facing same issue |
Expected Behavior
No timeout.
Current Behavior
Context
I am using Spring Security 5.5.3
Our team set up some JWT Decoder by utilizing
JwtDecoders
like this:In the current implementation, I see it is now trying to obtain signature algorithms and it possibly can cause timeout.
I already tried to look around, but the answer is not good enough. This similar discussion #4474 seems left hanging. This stackoverflow thread has hacky solution. This one also is not conclusive.
The text was updated successfully, but these errors were encountered: