I'm working on a bunch of microservices in VS.NET 2017, all written in ASP.NET Core (2.1) with SSL enabled. My project is like so
- Client project (running Angular)
- API Gateway project (using Ocelot)
All projects run asp.net core 2.1, and have SSL enabled using a self-signed certificate. Now All is fine, when I run everything localhost. However, if I start running stuff in containers, the certificates are starting to become a problem.
I can log in using the identityserver, bus as soon as I call the gateway microservice, it says:
The remote certificate is invalid according to the validation procedure
I found out the CN Name (or DNS names) of the certificate don't match the hostnames when running in docker, so I created a new certificate containing DNS names localhost, the ip of my machine, and all names of the docker containers.
There is a change, the system recognizes the 'multiple hostnames', but still the certificate isn't valid. This leaves me witht he problem that basically the microservices are just not capable of communicating with each other due to certificate problems. Does this sound familiar to someone? What can I do?
What I have tried:
I have tried generating one single certificate containing all hostnames, and changes the usersecrets of all projects to use that specific certificate.