Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 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.
Posted

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900