Skip to content

.Net: Remove the HTTPS validations in AzureClientCore#11943

Merged
markwallace-microsoft merged 2 commits intomicrosoft:mainfrom
snakex64:remove-https-validation
May 19, 2025
Merged

.Net: Remove the HTTPS validations in AzureClientCore#11943
markwallace-microsoft merged 2 commits intomicrosoft:mainfrom
snakex64:remove-https-validation

Conversation

@snakex64
Copy link
Contributor

@snakex64 snakex64 commented May 7, 2025

Remove HTTPS validation from AzureClientCore class.

We are redirecting requests internally to inject API keys securely and keep track of token usage in a transparent way, but this involves a YARP proxy in between certain applications and Azure OpenAI. That proxy, being internal behind our servers, doesn't use HTTPS and it doesn't need to use it either. The current version of Semantic Kernel throws an error when using a HTTP endpoint. Current fixes involve a lot of additional steps and going out of the server to come back in through our azure gateway or adding self-generated certificates and bypassing SSL errors, etc... This fix would be very helpful.

  • Remove the Verify.StartsWith validation for the endpoint parameter in the constructors of AzureClientCore class.
  • Remove the test case ConstructorWithInvalidEndpointShouldThrowArgumentException from AzureClientCoreTests class.
  • Ensure the remaining test cases do not enforce HTTPS validation.

* Remove HTTPS validation from `AzureClientCore` class. *

We are redirecting requests internally to inject API keys securely and keep track of token usage in a transparent way, but this involves a YARP proxy in between certain applications and Azure OpenAI. That proxy, being internal behind our servers, doesn't use HTTPS and it doesn't need to use it either. The current version of Semantic Kernel throws an error when using a HTTP endpoint. Current fixes involve a lot of additional steps and going out of the server to come back in through our azure gateway or adding self-generated certificates and bypassing SSL errors, etc... This fix would be very helpful.

* Remove the `Verify.StartsWith` validation for the `endpoint` parameter in the constructors of `AzureClientCore` class.
* Remove the test case `ConstructorWithInvalidEndpointShouldThrowArgumentException` from `AzureClientCoreTests` class.
* Ensure the remaining test cases do not enforce HTTPS validation.
@snakex64 snakex64 requested a review from a team as a code owner May 7, 2025 17:55
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels May 7, 2025
@github-actions github-actions bot changed the title Remove the HTTPS validations in AzureClientCore .Net: Remove the HTTPS validations in AzureClientCore May 7, 2025
@snakex64
Copy link
Contributor Author

@microsoft-github-policy-service agree

@snakex64
Copy link
Contributor Author

Hey guys! There seems to be a random unrelated error in the pipelines. I updated the branch to see if it helped, not sure if it requires a re-approval.
Thanks a lot!
@markwallace-microsoft

image

@markwallace-microsoft markwallace-microsoft added this pull request to the merge queue May 19, 2025
Merged via the queue into microsoft:main with commit 854330c May 19, 2025
20 checks passed
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
### Remove HTTPS validation from `AzureClientCore` class.

We are redirecting requests internally to inject API keys securely and
keep track of token usage in a transparent way, but this involves a YARP
proxy in between certain applications and Azure OpenAI. That proxy,
being internal behind our servers, doesn't use HTTPS and it doesn't need
to use it either. The current version of Semantic Kernel throws an error
when using a HTTP endpoint. Current fixes involve a lot of additional
steps and going out of the server to come back in through our azure
gateway or adding self-generated certificates and bypassing SSL errors,
etc... This fix would be very helpful.

* Remove the `Verify.StartsWith` validation for the `endpoint` parameter
in the constructors of `AzureClientCore` class.
* Remove the test case
`ConstructorWithInvalidEndpointShouldThrowArgumentException` from
`AzureClientCoreTests` class.
* Ensure the remaining test cases do not enforce HTTPS validation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants