erikcorry 11/16/2022 04:13 PMWhen you wake up:
For TLS the normal way around is that the device would verify it is talking to the correct server. This is what TLS is naturally suited for.
For example, there could be a physical button on the device. When the button is pressed, the device connects to a known wifi (could be provided by a phone with hotspot mode), then connects to a server over the net, which controls it. This could for example be a Supabase instance, hosted by yourself on Amazon, or hosted by Supabase.
The advantages:
* Device is a client - needs no TLS cert.
* Device verifies identity of the server
* The server can verify the device ID with a simple access key - each device has a different one, so there is not so much worry about it getting compromised. (optionally the device can provide a client cert so the server can verify the client - I think this requires patches to Supabase though).
* Since the device is a TLS client it doesn't need the TLS server code.
* Since the device is initiating the connection it doesn't need an open server port - less chance of DOS.
* If you later decide to add a cellular modem instead of the hotspot solution not much needs to change.
In order to control/monitor the device the tecnician's phone app could talk to the same Supabase server.
Disadvantage:
* The phone needs Internet access in order to provide a useful hotspot connection to the device.