Skip to content

pzinovkin/mtls-python-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mutual TLS with gRPC between Python and Go services

Shell commands use fish syntax.

mTLS with Nginx terminating TLS nginx

Install required tools:

brew install python3 go protobuf nginx cfssl tmux

Create and provision virtualenv

make initvenv

Generate certificates and keys

make certs

Activate virtualenv and start client's web app server:

. /venv/bin/activate.fish
./manage.py runserver

Start server in new terminal window:

go run server/server.go

Run single-process nginx in new terminal window:

nginx -p (pwd) -c nginx.conf

Or you can run server and nginx in on terminal with tmux:

tmux \
  new-session "go run server/server.go" \; \
  split-window -h "nginx -p (pwd) -c nginx.conf"