Lion Cipher Lab
Lock down a Mosquitto MQTT broker with passwords, topic ACLs and TLS
- Cyber / Security Engineer
- Intermediate
- ~60 min
- Free · no account required
Why it matters
MQTT is the small publish and subscribe protocol that thousands of sensors, cameras and smart devices use to send readings through a central broker. A broker with no authentication lets anyone who can reach it read every message and send commands to every device. Locking it down is three jobs: decide who may connect, decide what each one may touch, and encrypt the connection. Doing all three on a broker you can break safely teaches the controls an IoT security reviewer looks for.
What you'll learn
- explaining what MQTT brokers, topics, publishers and subscribers are
- proving a broker accepts anonymous clients, then turning anonymous access off
- creating a password file with mosquitto_passwd and loading it
- writing topic access rules so one user can only publish and another can only read
- adding a TLS listener with your own test certificate authority and testing it with mosquitto_pub and mosquitto_sub
Steps in this lab
- What MQTT and a broker are, and what you will lock
- Install the broker and clients, and make a workspace
- Baseline: prove an open broker lets anyone in
- Turn anonymous access off and create a password file
- Add topic ACLs: least privilege per user
- Make a private certificate authority and a server certificate
- Add the TLS listener and remove the plain one
- What this setup still does not do, and what you would add next
- Clean up
Open the full interactive lab →