Skip to content

Default timeout should be set when fetching JWKSet for private_key_jwt #1413

@martinr0x

Description

@martinr0x

Expected Behavior

Fetching JWKSets should timeout if the server does not respond in specified amount of time.

Current Behavior

Currently, the jwtDecoder will block until the socket hangs up, which can take few minutes. This is due to the usage of the default RestTemplate in NimbusJwtDecoder which uses the SimpleClientRequestFactory without a timeout by default.

Context

This issue only affects oAuth flows with private_key_jwt client authentication.
To mitigate this issue we implemented a custom JwtClientAssertionFactory that uses a RestTemplate with an explicit timeout.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions