Click here to Skip to main content
14,392,354 members
Rate this:
Please Sign up or sign in to vote.
Hi all!
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)
- Microservice
- Microservice
- Microservice
- IdentityServer4

All projects run 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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100