Challenge - 5 Problems
MQTTS Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Output of MQTT client connection command with TLS
What is the output when running this command to connect an MQTT client over TLS to a broker with a valid CA certificate?
IOT Protocols
mosquitto_sub -h test.mosquitto.org -p 8883 --cafile /etc/ssl/certs/ca-certificates.crt -t 'test/topic'
Attempts:
2 left
💡 Hint
Check if the port 8883 is the standard port for MQTT over TLS and if the CA file is correctly specified.
✗ Incorrect
The command uses mosquitto_sub to connect securely over TLS on port 8883 with a CA certificate file. If the broker supports TLS and the CA file is valid, it connects and subscribes successfully.
❓ Configuration
intermediate2:00remaining
Correct TLS configuration snippet for Mosquitto broker
Which configuration snippet correctly enables TLS on a Mosquitto broker listening on port 8883?
Attempts:
2 left
💡 Hint
TLS requires the broker to have server certificate and key. CA file is needed when requiring client certificates, which is optional but more secure.
✗ Incorrect
Option C correctly sets the listener on port 8883 with all TLS files and requires client certificates, which is a secure TLS setup.
❓ Troubleshoot
advanced1:30remaining
Troubleshooting MQTT TLS connection failure
A client fails to connect to an MQTT broker over TLS with the error 'TLS handshake failed'. What is the most likely cause?
Attempts:
2 left
💡 Hint
TLS handshake errors usually relate to certificate problems or mismatched TLS settings.
✗ Incorrect
An expired or invalid certificate on the broker causes the TLS handshake to fail because the client cannot verify the broker's identity.
🔀 Workflow
advanced2:30remaining
Steps to enable MQTT over TLS on a new broker
What is the correct order of steps to enable MQTT over TLS on a new Mosquitto broker?
Attempts:
2 left
💡 Hint
Certificates must be created before configuring the broker to use them.
✗ Incorrect
First generate CA, then server cert signed by CA, then configure broker, finally restart service to apply TLS.
✅ Best Practice
expert2:00remaining
Best practice for MQTT client certificate usage in MQTTS
Which practice is best for securing MQTT clients connecting over TLS with client certificates?
Attempts:
2 left
💡 Hint
Security improves when each device has its own certificate and compromised ones can be revoked.
✗ Incorrect
Unique client certificates per device allow fine-grained control and revocation, improving security in MQTTS.