DisableServerCertificateValidation: Fixes Default HttpClient to honor DisableServerCertificateValidation#4294
Merged
microsoft-github-policy-service[bot] merged 11 commits intomasterfrom Feb 2, 2024
Conversation
kirankumarkolli
commented
Feb 1, 2024
ealsur
reviewed
Feb 1, 2024
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs
Outdated
Show resolved
Hide resolved
ealsur
reviewed
Feb 1, 2024
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs
Outdated
Show resolved
Hide resolved
… and DocumentClient use a consistency way
…on and ServerCertificateCustomValidationCallback combination - Supporting test hook for DisableServerCertificateValidationInvocationCallback (specifically for only Disable checking)
0735a1b to
f78efff
Compare
philipthomas-MSFT
previously approved these changes
Feb 2, 2024
495669d
Co-authored-by: Fabian Meiswinkel <[email protected]>
Co-authored-by: Fabian Meiswinkel <[email protected]>
ealsur
reviewed
Feb 2, 2024
ealsur
reviewed
Feb 2, 2024
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs
Outdated
Show resolved
Hide resolved
ealsur
previously approved these changes
Feb 2, 2024
0dced98
kundadebdatta
approved these changes
Feb 2, 2024
Member
kundadebdatta
left a comment
There was a problem hiding this comment.
LGTM. Ideal if we could track this under a GitHub issue.
ealsur
approved these changes
Feb 2, 2024
kundadebdatta
pushed a commit
that referenced
this pull request
Feb 7, 2024
… DisableServerCertificateValidation (#4294) * DisableServerCertificateValidation: Fix ensuring that both HttpClient and DocumentClient use a consistency way * E2E Emulator test coverage * - Supporting the combination of both DisableServerCertificateValidation and ServerCertificateCustomValidationCallback combination - Supporting test hook for DisableServerCertificateValidationInvocationCallback (specifically for only Disable checking) * Addressing comments * Fixing a warning * Update Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs Co-authored-by: Fabian Meiswinkel <[email protected]> * Update Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs Co-authored-by: Fabian Meiswinkel <[email protected]> * Addressing commens * Undoing a change * Fixing UT * Renaming a test case name --------- Co-authored-by: Fabian Meiswinkel <[email protected]>
kundadebdatta
pushed a commit
that referenced
this pull request
Feb 7, 2024
… DisableServerCertificateValidation (#4294) * DisableServerCertificateValidation: Fix ensuring that both HttpClient and DocumentClient use a consistency way * E2E Emulator test coverage * - Supporting the combination of both DisableServerCertificateValidation and ServerCertificateCustomValidationCallback combination - Supporting test hook for DisableServerCertificateValidationInvocationCallback (specifically for only Disable checking) * Addressing comments * Fixing a warning * Update Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs Co-authored-by: Fabian Meiswinkel <[email protected]> * Update Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs Co-authored-by: Fabian Meiswinkel <[email protected]> * Addressing commens * Undoing a change * Fixing UT * Renaming a test case name --------- Co-authored-by: Fabian Meiswinkel <[email protected]>
This was referenced Jul 28, 2025
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
When
DisableServerCertificateValidationis set:ServerCertificateCustomValidationCallbackis conditionally set after validation when ConnectionPolicy is created. But HttpClient is created before ConnectionPolicy creation resulting in the configuration getting ignored.changes
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #IssueNumber