Demo repository for the talk "The shimmy to the left: why security is coming for engineers". You can find the slides here.
Certificates & keys can be easily generated for local testing with mkcert
.
export SERVER_CERT_FILE="localhost.pem"
export SERVER_KEY_FILE="localhost-key.pem"
export SERVER_PORT="1323"
export SIGNING_KEY="SUPER-DUPER-SECRET"
export POSTGRES_USER="SECRET-USER"
export POSTGRES_PWD="MY-SUPER-DUPER-SECRET-DB-PWD"
export POSTGRES_DB="postgresDBDemo4"
Run the demo servers one by one. Each demo builds upon the previous one.
go run demo1/server.go
go run demo2/server.go
go run demo3/server.go
This last demo requires Postgres to run locally. The easiest way to do this is through Docker:
docker run \
--name demo4DB \
-p 5432:5432 \
-e POSTGRES_USER=$POSTGRES_USER \
-e POSTGRES_PASSWORD=$POSTGRES_PWD \
-e POSTGRES_DB=$POSTGRES_DB \
-d \
postgres \
-c ssl=on \
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem \
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
Then, run the demo as previously:
go run demo4/server.go