WebThingsIO / registration_server

The registration server for WebThings Gateway.
Mozilla Public License 2.0
79 stars 33 forks source link

Make PageKite use a unique token per gateway instead of a hardcoded secret #11

Closed andrenatal closed 6 years ago

andrenatal commented 7 years ago

Pagekite secret is harcoded and the same to every user. We should change use the token.

mrstegeman commented 6 years ago

There doesn't seem to be a way to do this in our current setup without updating the PageKite config and restarting every time a gateway is registered.

mrstegeman commented 6 years ago

PageKite can apparently do authentication based on a DNS lookup, but it's completely undocumented. However, that looks like the best path forward.

See AuthThread in pk.py.

mrstegeman commented 6 years ago

As it turns out, this is already implemented in the server! We just weren't using it.