chrisjoyce911 / esp32FOTA

Experiments in firmware OTA updates for ESP32 dev boards
The Unlicense
363 stars 89 forks source link

Basic authentication? #128

Closed BLLuis closed 6 months ago

BLLuis commented 1 year ago

Hi, using this library from some days ago and works very well, I implemented Full/Only Firm/Only SPIFSS updates in the local network and via internet, everything works fine.

I wonder why there is no basic authentication?

When I open my router port for my web server, I got a lot of traffic from bots to do "something" with my server, so, I use to put at least basic authentication to avoid some of the attacks. Is not the perfect solution, but It help to minimize attacks or got some firmware stolen. Server certificates could be a heavy task for a beginner, also, sometimes there is no free space on the SPIFSS or in the main code.

Thanks

sschueller commented 7 months ago

You can use the add header feature:

FOTA.setExtraHTTPHeader("Authentication", "Basic: yourbase64hash");
BLLuis commented 6 months ago

Thanks, didn't noticed about setExtraHTTPHeader.