lasselukkari / aWOT

Arduino web server library.
MIT License
283 stars 41 forks source link

Webserver with https ? #132

Closed ArminPP closed 3 years ago

ArminPP commented 3 years ago

Is there a possibility to operate the awot web server based on https with WiFi and Ethernet ?

Thank you for some advice, Armin

lasselukkari commented 3 years ago

Kinda. On ESP8266 this already works but is extremely slow because of the limited processing power. Using it for sending credential is maybe ok, but anything else involving more bandwidth is just way too slow.

I have not verified the situation lately but last time I checked the ESP32 arduino core did not have the secure server implemented yet. Here is the open issue: https://github.com/espressif/arduino-esp32/issues/3902. It says "https server will be added in the next major version of Arduino".

To sum it up there is nothing preventing using the library with a secure server implementation. It works with any class derived from the Stream or Client.

ArminPP commented 3 years ago

I see, thank you for your explanation. So I'm waiting for the next Arduino release...

ArminPP commented 3 years ago

I am reopening this thread because unfortunately I have not found a solution to my problem.

I want to make the aWOT web server secure via WiFi and Ethernet, either by HTTPS or by server-side encryption.

At the moment I am using basic auth WebAPP.use(&auth); which is not really secure I presume... (And it does not secure the credentials)



So I tried to encrypt the data with AES, on ESP32 with https://github.com/kakopappa/arduino-esp8266-aes-encryption-with-nodejs and in aWOT with https://github.com/brix/crypto-js. This worked fine, however the key is unencrypted readable from the browser with the developer tools.


I would very much like to use HTTPS, or at least encrypt the most important data, but unfortunately I can't find a solution.

I am very grateful for any tip, link or advice on the solution, and I would also be very happy to see a completely new approach that I am not yet familiar with.

Thanks, Armin

lasselukkari commented 3 years ago

The version 2 of the esp32 arduino core is not out yet. Are you using the alpha version of the core?

Edit: The core issue is still open and the feature is not implemented. There is no really secure solution before the core supports the encrypted server connections. If you are just sending initial wifi credentials in AP mode the wifi connection itself should be encrypted.

ArminPP commented 3 years ago

That's a pity, I was still hoping for a workaround ;-) Now I have to be patient again ...