This is meant to act as an example of how to embed a containerized CA inside of a docker network for use with an MQTT bus. The goal is to create the ability for disconnected deployments to generate and manage their own certs so that traffic on the MQTT bus can be properly TLS encrypted.
- fill in the
ca.env
files with the appropriate values for CA initialization - fill in the secrets files (by default:
.ca_password
,.mqtt_password
, and.mqtt_user
) with your preferred values docker compose up -d --build
- wait for the CA and mqtt containers to become healthy
- use the
mosquitto_pub
andmosquitto_sub
binaries from the client container to test functionality
mosquitto_pub -h server.mqtt.local -p 8883 -u $(cat /run/secrets/mqtt_user) -P $(cat /run/secrets/mqtt_pass) --tls-use-os-certs -t "enctest" -m "I'm Encrypted!"