MQTT with Self Signed TLS
This tutorial explains how to enable TLS security using self-signed certificates with YuDash products.
To establish a secure connection with the MQTT broker, the client must present the following three files during the TLS handshake:
CA Certificate (
.pem
) – Certificate Authority file used to verify the server's certificate.Client Certificate (
.crt
) – Identifies the YuDash device to the server.Client Private Key (
.key
) – Used to prove ownership of the client certificate.
To use self-signed TLS certificates with YuDash devices, you must upload the required files via the Assets section on the YuDash configuration page.
Connecting YuDash to AWS IoT Core via MQTT
In this tutorial, we will walk through the process of configuring YuDash devices to connect with AWS IoT Core over MQTT.
To ensure a smooth setup, we will first demonstrate the connection using the MQTTX desktop client as a reference. Once verified, the same configuration can be applied to YuDash via its JSON settings.
1) MQTT General Settings in MQTTX
MQTTX General Settings are filled with AWS IoT Core broker details. "CA or Self signed certificate" is selected.
2) Certificates section in MQTTX
3) MQTT Settings mapped to YuDash configuration
The MQTT settings are per regular MQTT settings. MQTT Secure Layer is enabled. We will not select "MQTT CA Certificate" as we will use self signed certificates. These files will uploaded from Assets section (explained in next step).
4) Uploading Certificate files in YuDash through Assets folder
5) Mapping the uploaded certificate files in MQTT Settings
After the certificate files are uploaded in the YuDash IoT device (/assets), the MQTT settings have to be manually updated in lynx.json file. Besides regular MQTT settings, the "tls*" keys have to be inserted for mapping to certificate files.
6) Sample lynx.json for self signed certificate
Following is sample mqttSettings block to use self signed certificate in TLS
Last updated