Skip to content

kokizzu/natsmtls1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example how to use mTLS with NATS

  1. Install mkcert
sudo apt install libnss3-tools certutil
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo mv mkcert-v*-linux-amd64 ~/go/bin/mkcert # or /usr/local/bin/mkcert
  1. generate both certs
mkcert \
  -key-file server-key.pem \
  -cert-file server-cert.pem \
  localhost

mkcert \
  -client \
  -key-file client-key.pem \
  -cert-file client-cert.pem \
  localhost

sudo cp ~/.local/share/mkcert/rootCA.pem  ca.pem
  1. run example:
go rum main.go

About

Example how to use NATS with mTLS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages