Blog

MQTT Security

Secure your MQTT deployment: TLS, authentication, credentials on devices and protection against abuse, with practical checklists.

How to Rotate MQTT Credentials Without Downtime

A step-by-step dual-credential strategy for rotating MQTT usernames and passwords across a fleet: stage the new credential, switch with fallback, verify and only then revoke the old one.

7 min read

Storing MQTT Credentials Securely on Embedded Devices

A practical comparison of ways to protect MQTT usernames and passwords on ESP32 and Linux devices, from encrypted NVS and flash encryption to secure elements and TPM-backed systemd credentials.

7 min read

MQTT Access Control Lists (ACLs): Concepts and Design

What MQTT access control lists are, how brokers such as Mosquitto express topic-level read and write rules, how denied operations behave and how to design topic namespaces so authorization stays simple.

7 min read

MQTT TLS Handshake Failed: How to Diagnose and Fix It

A step-by-step troubleshooting guide for MQTT TLS handshake failures, using openssl s_client to pinpoint wrong ports, missing CAs, SNI problems, clock drift, TLS version mismatches and intercepting proxies.

8 min read

Common MQTT Vulnerabilities and How to Mitigate Them

A defender's overview of MQTT vulnerability classes in brokers, clients and deployments, with concrete mitigations and a patching strategy that does not depend on luck.

7 min read

MQTT TLS 1.3: Handshakes, Cipher Suites and Performance

How TLS 1.3 changes MQTT connections: fewer round trips, a smaller set of strong cipher suites and different trade-offs for microcontrollers. Includes Python, Node.js, Mosquitto and OpenSSL examples.

7 min read

MQTT Audit Logging: What to Record and Why

A practical guide to MQTT audit logging: which events matter for security and compliance, what fields to capture, where logs come from in a managed setup, and how to build a simple pipeline.

7 min read

MQTT JWT Authentication: Tokens in the Password Field

A practical explanation of carrying JSON Web Tokens in MQTT CONNECT, how brokers validate them, how to handle expiry and refresh on devices, and when static per-device credentials are the simpler choice.

7 min read

Is MQTT Secure? Threats, Myths and Real Protections

An honest look at MQTT security: what the protocol does and does not protect, the threats that actually hit deployments, common myths, and the layers that make an MQTT system secure in practice.

7 min read

End-to-End MQTT Payload Encryption with AES-GCM

TLS protects MQTT messages in transit, but the broker still sees plaintext. Learn how to add end-to-end MQTT payload encryption with AES-GCM in Python, and how to handle keys, nonces and topics safely.

8 min read

ESP32 Certificate Pinning and CA Validation for MQTT

Three ways to validate a broker certificate on an ESP32: embed a root CA, use the ESP-IDF certificate bundle, or pin. Learn the trade-offs and get working MQTT code for each.

7 min read

Secure IoT Device Provisioning for MQTT Fleets

How to get a unique, protected MQTT identity onto every device: factory provisioning, claim-certificate and bootstrap flows, per-device credentials and the steps to connect provisioned devices to a managed broker.

7 min read

MQTT Username and Password Authentication Explained

How usernames and passwords travel in the MQTT CONNECT packet, why they must always be paired with TLS, how brokers reject bad credentials and how to manage per-device credentials on a managed broker.

7 min read

MQTT Rate Limiting and DoS Protection Explained

How MQTT brokers defend against connection floods, publish storms and oversized payloads, what limits a managed broker applies, and how to write clients that respect them.

8 min read

Self-Signed Certificate MQTT Setup: When and How to Use One

A hands-on tutorial for building a private certificate authority with OpenSSL, securing a lab Mosquitto broker on port 8883 and connecting clients, plus the operational costs that make public certificates easier in production.

7 min read

Your private MQTT broker is a few clicks away

Create an account, get your broker credentials and connect your first device — no servers to install, patch or scale.