Is your feature request related to a problem? Please describe.
Currently when using the Cosmos DB emulator it is necessary to either download the certificate from the emulator using a well known endpoint and install it into the certificate store, or override the HttpClient to ignore the certificate. I am proposing that the format of the Cosmos DB client connection string be updated to support ignoring the certificate. This is a similar pattern to what SQL Server follows.
Describe the solution you'd like
From a users perspective, ignoring the Cosmos DB emulator certificate should be as simple as appending:
AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==;IgnoreEndpointCertificate=true;
The default value would be false. Note that the implementation should not restrict ignoring the certificate to the default emulator endpoint because some tools such as .NET Aspire may randomly assign a proxy port in front of the emulator.
Describe alternatives you've considered
The current recommendations (installing the certificate) or having developers write code to ignore the SSL check is cumbersome and easy to mess up.
Additional context
This request is coming from the .NET Aspire team. We've been working with Kevin Pilch (@Pilchie) on adding Cosmos support to Aspire and this was one of the stumbling blocks that we came up against.
Is your feature request related to a problem? Please describe.
Currently when using the Cosmos DB emulator it is necessary to either download the certificate from the emulator using a well known endpoint and install it into the certificate store, or override the HttpClient to ignore the certificate. I am proposing that the format of the Cosmos DB client connection string be updated to support ignoring the certificate. This is a similar pattern to what SQL Server follows.
Describe the solution you'd like
From a users perspective, ignoring the Cosmos DB emulator certificate should be as simple as appending:
The default value would be
false. Note that the implementation should not restrict ignoring the certificate to the default emulator endpoint because some tools such as .NET Aspire may randomly assign a proxy port in front of the emulator.Describe alternatives you've considered
The current recommendations (installing the certificate) or having developers write code to ignore the SSL check is cumbersome and easy to mess up.
Additional context
This request is coming from the .NET Aspire team. We've been working with Kevin Pilch (@Pilchie) on adding Cosmos support to Aspire and this was one of the stumbling blocks that we came up against.