Skip to content

.Net: Remove the HTTPS validations in AzureClientCore #11943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

snakex64
Copy link

@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
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.

2 participants