Add ssl.enabled property for HTTP client settings - #51835
Closed
sandeep780049 wants to merge 1 commit into
Closed
sandeep780049 wants to merge 1 commit into
sandeep780049 wants to merge 1 commit into
Conversation
Unlike every other *.ssl.enabled property in Spring Boot, the HTTP client settings SSL configuration had no enabled flag, making it impossible to explicitly disable SSL (for example when a base or group-level bundle is configured but SSL should not be used). A bug of omission as discussed in spring-projectsgh-51472: ssl.enabled=true with no bundle falls back to the JDK's default trust material, while ssl.enabled=false acts as a kill switch that clears any configured bundle, mirroring the semantics used elsewhere such as spring.data.redis.ssl.enabled. Closes spring-projectsgh-51472 Signed-off-by: Sandeep yadav <224312127+sandeep780049@users.noreply.github.com>
Member
|
Thanks for the pull-request, but as mentioned in the issue comments #51472 is currently labeled as |
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.
Adds the missing `spring.http.clients.ssl.enabled` property (and the matching per-service-client property) to `HttpClientSettingsProperties.Ssl`, aligning HTTP client SSL configuration with every other `*.ssl.enabled` property in Spring Boot.
As noted in gh-51472 (surfaced during review of gh-51468), `HttpClientSettingsProperties.Ssl` only exposed `bundle`. There was no way to explicitly disable SSL when a bundle was inherited from base settings or configured at group level. This PR treats it as a bug of omission per @wilkinsona's direction on the issue:
An earlier iteration applied the kill switch before the `orElse` merge, but that would have let a base-settings bundle resurrect itself through the null-bundle merge, so the clearing is deliberately applied after the merge.
Closes gh-51472
N/A
Yes — 4 new tests in `HttpClientSettingsPropertyMapperTests`:
All 13 tests in the class pass, `checkFormat` passes, and the module compiles cleanly.
No.