Apply JWT decoder timeout properties for AAD and B2C resource servers#49329
Open
rujche wants to merge 5 commits into
Open
Apply JWT decoder timeout properties for AAD and B2C resource servers#49329rujche wants to merge 5 commits into
rujche wants to merge 5 commits into
Conversation
- Apply jwtConnectTimeout/jwtReadTimeout properties to RestTemplate used by JWT decoder in AadResourceServerConfiguration and AadB2cResourceServerAutoConfiguration - Remove incorrect @deprecated annotation from timeout properties in AadAuthenticationProperties and AadB2cProperties (the deprecation was based on a RestOperations bean mechanism from PR #30456 that was later removed, making the deprecation guidance invalid) - Fix javadoc: correct default value description from '500s' to '500ms' - Add tests for default and custom timeout property values
6 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Spring Cloud Azure (autoconfigure) resource-server support so the jwtConnectTimeout / jwtReadTimeout properties are actually applied to the HTTP client used for JWK retrieval, and cleans up related property metadata and tests.
Changes:
- Apply configured JWT connect/read timeouts to the
RestTemplate/RestTemplateBuilderused by AAD and B2C JWT decoding/JWK retrieval. - Remove incorrect
@Deprecatedmarkers on JWT timeout/size-limit properties and fix the documented default timeout unit. - Add unit tests for default/custom timeout property binding.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 24 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfiguration.java | Applies B2C timeout properties to the RestTemplateBuilder used for JWK retrieval. |
| sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfiguration.java | Applies AAD timeout properties to the RestTemplate passed into NimbusJwtDecoder. |
| sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/properties/AadB2cProperties.java | Removes deprecations and updates Javadoc defaults for JWT timeout/size-limit properties. |
| sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/properties/AadAuthenticationProperties.java | Removes deprecations and updates Javadoc defaults for JWT timeout/size-limit properties. |
| sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aadb2c/configuration/AadB2cResourceServerAutoConfigurationTests.java | Adds tests for default/custom B2C timeout property values. |
| sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/aad/configuration/AadResourceServerConfigurationTests.java | Adds tests for default/custom AAD timeout property values. |
…on timeout fields
Member
Author
|
/azp run java - spring - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
bigdaddykane18
approved these changes
Jun 1, 2026
|
What's a rough timeframe for this to make it to a release of com.azure.spring spring-cloud-azure-dependencies? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines