regner / albiondata-client

Distributed client for the Albion Data project.
https://albion-data.com/
MIT License
38 stars 17 forks source link

Secure the websocket connection #127

Open regner opened 7 years ago

regner commented 7 years ago

Concern: We have a websocket open that would allow anyone that connects to it access to any of the public and private data we push over it.

Scenario: Evil person comes along, creates nifty website, encourages many people to visit web site. After a while evil person adds a little script that attempts to connect to the localhost websocket. If successful it then ships the data off to its own backend.

This would be bad. Very bad.

There are a few ways this could be prevented:

Thoughts? @pcdummy

oxisto commented 7 years ago

Checking the origin header should be a first step, this should actually be pretty simple. What exactly is the websocket server used for?

jochumdev commented 7 years ago

Another option:

regner commented 7 years ago

@oxisto One of our objectives right now is to give more reason for people to download and install the client. A way we decided we could do that, and help the rest of the development community, was by offering a local websocket server. This would allow other developers to build applications without having to dig into the network packets. They could just tell their users to install the albiondata client along with their application and just connect to the local websocket server.