Skip to content

Demo using Vault as a private CA for mutual TLS auth

Notifications You must be signed in to change notification settings

lewis-od/vault-mtls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mutual TLS Demo

Running in Docker

./setup-vault.sh docker

To run vault in docker and set it up as a CA using Terraform.

Then:

./gen-certs.sh docker

To generate TLS certificates for the client and server, and to download the CA's root certificate.

Finally:

docker-compose up --build

Will build the client and server applications, then run them in docker.

The client calls a HTTPS endpoint on the server every second, with Vault acting as the root certificate authority.

Running natively

To run natively on your machine, run the same first 2 commands above but without the docker argument.

In one terminal window, run:

cd server
go run main.go

to start the server. Then start the client in another terminal window with:

cd client
MTLS_SERVER=https://localhost:8443 go run main.go

ToDo

  • Implement mutual TLS (currently only one-way)
  • Add an intermediate CA
  • Deploy in k8s

About

Demo using Vault as a private CA for mutual TLS auth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published