ESP32 TLS/SSL & MQTT with MicroPython
Posted: Tue Jan 16, 2018 7:09 pm
Hi,
I'm hoping to find some guidance here on how I can add TLS/SSL to a MQTT setup on a LAN that I've been working on with a Raspberry pi broker and esp32s running micropython.
I've seen that the Pycom board fork examples has an MQTTS setup with AWS (whose form looks most ideal since the cert itself is not stored as plaintext?)
and I've tried out a tutorial using the Arduino ESP32 implementation that worked well enough (but I clearly favor MicroPython)
( http://www.iotsharing.com/2017/08/how-to-use-esp32-mqtts-with-mqtts-mosquitto-broker-tls-ssl.html )
Microcontrollers are pretty much brand-new to me, but it appears that the framework has already been established for doing this with the
ESP32 and the quite pleasant to use micropython, but I'm a bit stuck on this.
I'd very much appreciate any tutorial, snippet, pointers, etc.!
And a very big thanks to the creator and all the developers in general for all the awesome work that you do in creating and developing MicroPython!
So freakin fun!
-------------
Motivation on the security desire:
Since I'm concerned about protecting both my family's electronic safety, as well as our physical safety, (e.g. b/c appliance or lights attached to switches run by microcontrollers) I'm uncomfortable with the ideas of:
--relying on wifi security alone to protect against local attacks
--having any unsecured device on a permanent network
(For local attacks: the growing sophistication and prevalence of prepackaged malicious tools for any fool to use is getting ridiculous
and for everything else: it's becoming AI-driven and there's ip and mac address spoofing to get around firewall rules)
I'm hoping to find some guidance here on how I can add TLS/SSL to a MQTT setup on a LAN that I've been working on with a Raspberry pi broker and esp32s running micropython.
I've seen that the Pycom board fork examples has an MQTTS setup with AWS (whose form looks most ideal since the cert itself is not stored as plaintext?)
and I've tried out a tutorial using the Arduino ESP32 implementation that worked well enough (but I clearly favor MicroPython)
( http://www.iotsharing.com/2017/08/how-to-use-esp32-mqtts-with-mqtts-mosquitto-broker-tls-ssl.html )
Microcontrollers are pretty much brand-new to me, but it appears that the framework has already been established for doing this with the
ESP32 and the quite pleasant to use micropython, but I'm a bit stuck on this.
I'd very much appreciate any tutorial, snippet, pointers, etc.!
And a very big thanks to the creator and all the developers in general for all the awesome work that you do in creating and developing MicroPython!
So freakin fun!
-------------
Motivation on the security desire:
Since I'm concerned about protecting both my family's electronic safety, as well as our physical safety, (e.g. b/c appliance or lights attached to switches run by microcontrollers) I'm uncomfortable with the ideas of:
--relying on wifi security alone to protect against local attacks
--having any unsecured device on a permanent network
(For local attacks: the growing sophistication and prevalence of prepackaged malicious tools for any fool to use is getting ridiculous
and for everything else: it's becoming AI-driven and there's ip and mac address spoofing to get around firewall rules)