This repository sets up a TLS PKI and a couple of Nginx Docker containers to show the use of TLS client certificates with Nginx.
Build the PKI, start the containers and run the tests with make test
# Build the PKI
> make build-pki
> docker-compose up backend> docker-compose run --rm client bashThis should work.
> curl http://open.backend.testThis should fail because the signing CA is not in the client's trust store.
> curl https://secure.backend.testThis should work.
curl --cacert ./test-ca.pem https://secure.aam.testThis should fail because the signing CA is not in the client's trust store.
> curl https://client.backend.testThis should fail because the client cert is not presented.
curl --cacert ./test-ca.pem https://client.backend.testThis should work.
> curl --cert ./client.pem:password --cacert ./test-ca.pem https://client.backend.testHow to create your own SSL certificate authority Client-side SSL AWS API-Gateway client authentication and Nginx Nginx add client cert
ngx_http_proxy_module
ngx_http_ssl_module
ngx_stream_proxy_module (not used here but useful if you want to proxy something other than HTTP)