CertExample

Example for supporting secure service to service communication

Stars
12
Committers
1

CertExample

Example for supporting service to service communication over HTTPS in local container debugging.

Highlights

CreateCerts.sh

Creates a self-signed certificate to act as a CA and certificates for the front end and back end services signed by the self-signed certificate.

Create-Certs.ps1

Runs CreateCerts.sh in a container, trusting the generated self-signed certificate as a root CA for the current user, and generating .env files to configure the services to use the test certificates.

CreateCerts target in BackEnd\BackEnd.csproj

This target handles running Create-Certs.ps1 when the project is opened or built in VS (so you don't have to remember to run the script before opening the project)

testCerts stage in BackEnd\Dockerfile / FrontEnd\Dockerfile

This stage adds the self-signed certificate as a trusted certificate authority in the containers.

ContainerCerts.props

Properties to customize Docker debugging to use the testCerts stage and the generated files. Docs

docker-compose.vs.debug.yml

Compose file to customize Docker Compose debugging to use the testCerts stage and the generated files. Docs