azuressl-certificateazure-cosmosdb

Azure Cosmos DB Emulator on local network throwing security error


I have set up the Azure Cosmos DB emulator to run on one of the Windows Server 2012 R2 VMs in our local network as described here.

I have exported the certificate from the server and imported to my client machine. When I call my api which connects to the emulator through postman I get the following error:

WinHttpException: A security error occurred                      
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw                       
System.Threading.Tasks.RendezvousAwaitable.GetResult()
System.Net.Http.WinHttpHandler+<StartRequest>d__105.MoveNext()

I can browse to the emulator explorer but I get the "Your connection is not private" message in Chrome and have to do the "proceed (unsafe)" to get to it.

The error message is pretty unhelpful but I'm presuming this is a certificate issue, and there is no way to bypass SSL when using the emulator. The guidance in the microsoft documentation is quite sparse on this issue also, do I need to generate a new certificate somehow when using the emulator on a local network?


Solution

  • I managed to get around this issue by importing the exported SSL certificate into the client machines Trusted Root Certification Authorities

    Certificate Manager