How does .NET Aspire support HTTPS and certificate handling for the Cosmos DB vNext (preview) emulator? #15571
jennyyao0918
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I’m using .NET Aspire with Azure Cosmos DB preview (vNext) emulator via:
Plain Text
builder.AddAzureCosmosDB("cosmos")
Show more lines
RunAsPreviewEmulator() uses the Linux‑based Cosmos DB emulator (preview).
By default, the emulator runs over HTTP, but the Cosmos .NET SDK requires HTTPS, so HTTPS is needed for real usage.
I’m trying to understand the Aspire‑supported approach for the following:
How to handle or bypass the certificate validation issue
The GA (Windows) emulator supports
AZURE_COSMOS_EMULATOR_DISABLE_CERTIFICATE_AUTHENTICATION
The preview emulator does not seem to support this
Is trusting/importing the emulator cert the only supported option?
Is there any Aspire‑level configuration to bypass cert validation (similar to GA), or is this intentionally not supported?
Is the lack of a cert‑disable option intentional for the preview emulator due to its Linux/container architecture?
I’ve noticed Aspire internally uses HTTP endpoints for emulator health checks (for example /ready), but I can’t find documentation or examples for configuring the Cosmos HTTPS data endpoint or cert handling in Aspire.
Any official guidance or references would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions