My company develops a WiFi-connected IoT product. I want to make sure that the process of getting the user's WiFi credentials into the device is as safe as possible. At the moment, the product is in a prototype stage, so we can (and will) make further changes before it hits the market.
At the moment, the process is as follows:
- The device creates its own WiFi hotspot. The credentials for this hotspot are printed onto a label on the device itself.
- The user visits a certain URL (a web page served by an embedded web server on the product, using plain HTTP)
- The user enters his WiFi credentials into a form on that page
- The device saves those credentials and uses them to connect to the user's WiFi
Several guys in the company think that this is secure. An attacker would need to get into the hotspot to sniff on the user's WiFi credentials.
I disagree since I think that getting into the WiFi is a pretty low hurdle. The attacker could have glanced at the credentials on the label during a visit, brute-forced his way into the WiFi hotspot or exploited a weakness in the WiFi hotspot authentication (not unheard of). I suggest to change the process to look as follows:
- The company creates a self-signed SSL root certificate.
- We use this root cert to sign individual certificates unique to each product sold. The product's certificate and private key is embedded in flash memory during manufacturing.
- The user goes to our website and downloads our root certificate and installs it into his operating system.
- The device creates its own WiFi hotspot. The credentials for this hotspot are printed onto a label on the device itself.
- The user visits a certain URL (a web page served by an embedded web server on the product, using HTTPS and the device's unique certificate. The browser trusts the certificate because our root cert is installed.)
- The user enters his WiFi credentials into a form on that page. The information is sent to the device over the TLS-encrypted channel.
- The device saves those credentials and uses them to connect to the user's WiFi
I think that this process is very secure. But it imposes other problems:
- How can we update a device's certificate? Possible, but very cumbersome and a lot of effort.
- The user has to manually install a certificate. This is not very user-friendly and less tech-savvy users may fail to do it correctly even if we provide very detailed instructions.
My question(s):
- Is the suggested process secure enough for an IoT product (imagine it as some kind of smart energy meter measuring your electricity consumption)?
- Is there any way to improve the user experience of the process (e.g. getting around the need to install our certificate)?
- Is there any way to improve the process in terms of implementation complexity for us (without compromising the user's security)?
- Are there alternative ways to get the WiFi credentials onto our device? We cannot use Bluetooth and the device has neither screen nor keyboard.