Skip to content

.Net: Remove the HTTPS validations in AzureClientCore - #11943

Merged
Mark Wallace (markwallace-microsoft) merged 2 commits into
microsoft:mainfrom
snakex64:remove-https-validation
May 19, 2025
Merged

Mark Wallace (markwallace-microsoft) merged 2 commits into
microsoft:mainfrom
snakex64:remove-https-validation

Conversation

@snakex64

@snakex64 Pascal (snakex64) commented May 7, 2025 •

Copy link
Copy Markdown
Contributor

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
Pascal (snakex64) requested a review from a team as a code owner May 7, 2025 17:55
@markwallace-microsoft Mark Wallace (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
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@snakex64

Copy link
Copy Markdown
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!
Mark Wallace (@markwallace-microsoft)

image

Merged via the queue into microsoft:main with commit 854330c May 19, 2025
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.

This branch was previously deployed

1 inactive deployment
integration — adc8b7b5 Deployed May 19, 2025 by snakex64
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