Menu

Your MQTT Username and Password

OhioIoT uses a simple security model on purpose. Your devices connect over TLS with one MQTT username and password for your whole account. That makes it easy to get a device online. It also means the password is worth protecting, because every one of your devices uses it.

This page is about those MQTT credentials. The login you use for the OhioIoT app is separate. So are the auth keys used by some HTTP tools, which have their own HTTP Auth Keys section in Settings.

What Protects Your Connection

TLS on port 8883. The hosted broker is mqtt.ohioiot.com. It only accepts encrypted connections on port 8883. There is no plaintext MQTT port on the internet. TLS stops someone on the network from reading your password, reading your data, or changing messages in transit. It also lets your device check that it is talking to the real OhioIoT broker.

A trusted certificate already in the SDK. The OhioIoT SDK includes Let's Encrypt's ISRG Root X1 certificate, so your ESP32 can verify the broker. You do not need to download a certificate.

Your MQTT username and password. Anonymous connections are refused. You find both in Settings, under MQTT Credentials. Click Generate New to get a new password, then use the copy button to copy it. The eye button shows the password.

These credentials are not your OhioIoT app login. Someone with only the MQTT password cannot sign in to your account. But anyone who can open Settings can copy the MQTT password, so protect your app login too.

TLS does not help once a password has leaked, or if someone is holding the board and can read the firmware off it.

Why One Username and Password

All of your devices use the same MQTT username and password. Each device still has its own identity: on first boot, the SDK generates a device ID and stores it on the board. Topics look like username/deviceID/type/..., for example larry/a8f3k2m1/numb/temperature/temp.

After you log in, the broker lets you publish and subscribe only under your own username. Anything outside that is dropped. Your device doesn't get an error, so a message that never shows up is the clue. Other users cannot reach your topics, and you cannot reach theirs.

The username is the first part of every topic, so it is not a secret. The password is.

The tradeoff: if the password leaks from one device, whoever has it can read and publish on all of your topics, not just that device's. They still cannot reach anyone else's account.

What You Skip

You do not create, register, and rotate client certificates, the setup used by platforms like AWS IoT Core and Azure IoT Hub.

You also do not create roles, assign permissions to roles, and then assign roles to users or devices (role-based access control).

The benefit is speed. Generate a password, put it in your sketch, and the device connects.

What It Costs

You have one username and password for your whole account. That keeps things simple, but it means changing the password touches every device. Be ready for the worst case: you may have to collect each device, plug it in, and flash the updated firmware by hand. If you never expose your password, you may never need to do this.

Platforms that give each device its own certificate or token can usually revoke just the one that leaked. With OhioIoT, you change the one password and update every device.

If Your Password Leaks

Plan on flashing each device by cable with the new password. That always works, but it means getting your hands on every board.

If your devices are online and already take wireless updates, you may be able to skip most of that. When you generate a new password, devices that are already connected stay connected. The new password only matters the next time each device connects, so you have a window to send it out wirelessly.

  1. Open Settings, go to MQTT Credentials, click Generate New, and copy the new password.
  2. Put the new password in your firmware's credentials and build it.
  3. Send the new firmware to all your devices with a wireless update, as soon as you can.
  4. Each device restarts and logs in with the new password.
  5. Watch your devices come back online.

If a device drops off and reconnects before its update arrives, it will be refused, because it still has the old password. You will need to flash that one by cable.

Someone with your password can connect as you, read your data, publish data, and send commands your devices listen for. They cannot log into the OhioIoT app with it, and they cannot reach other users' topics.

Changing the password does not kick anyone off. Someone already connected with your old password stays connected, just like your devices, until they disconnect and try again. OhioIoT can't undo what a person does with your password, so treat it like a house key.

Do You Need a Client Certificate?

No. You don't need a client certificate to connect. Your username and password are all it takes.

Extra Protection If You Need It

For a typical home or shop project, TLS plus a carefully kept password is the intended setup.

If a device might leave your hands, Espressif offers two optional chip features, flash encryption and secure boot. Without flash encryption, someone with the board and a USB cable can often read the firmware, including the password. These take extra setup and are not required.

How This Compares

OhioIoTCertificates (AWS IoT Core, Azure IoT Hub)Roles and Permissions (some hosted brokers)
How a device proves who it isOne account username and password, over TLSA certificate and private key per device, plus policiesCredentials plus roles you define
What you set upGenerate a password, put it in your sketchCreate and register certificates, attach policies, plan rotationCreate credentials, roles, permissions, assignments
If one device leaksGenerate New, update every deviceRevoke that device's certificateRevoke one credential, if each device had its own

Adafruit IO works much like OhioIoT (username plus one account key). Blynk and Arduino Cloud give each device its own token, which limits the damage if one board leaks.