Lion Cipher Lab

Lock down a Mosquitto MQTT broker with passwords, topic ACLs and TLS

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

Steps in this lab

  1. What MQTT and a broker are, and what you will lock
  2. Install the broker and clients, and make a workspace
  3. Baseline: prove an open broker lets anyone in
  4. Turn anonymous access off and create a password file
  5. Add topic ACLs: least privilege per user
  6. Make a private certificate authority and a server certificate
  7. Add the TLS listener and remove the plain one
  8. What this setup still does not do, and what you would add next
  9. Clean up

Open the full interactive lab →

Keep learning