eufy-security-ws icon indicating copy to clipboard operation
eufy-security-ws copied to clipboard

[Feature request]: Allow to define user authentication for websocket server

Open fragger42 opened this issue 2 years ago • 2 comments

Describe the solution you'd like

The Eufy Security Websockets server allows a pretty large control over the used cameras. However, apart from setting the port and a permission limited eufy cloud user, there is no possibility to secure it. As it is also as a base for other projects I fear that security issues might arise. Therefore, I ask for two new features:

  1. Allow to restrict the server to listen to localhost only and set this as default. This would be enough for most users to keep them reasonable safe as in most usage scenarios the client will be on the same server. I can furthermore imagine users with multiple network interfaces who also want to have a setting for the listening network interface instead of "all".
  2. Allow setting user/password for client connections to the websocket server so that it is possible to secure the websocket server in some way. However, this would break compatibility to external programs using the websocket server so it would be a good idea to make it optional.

fragger42 avatar Dec 29 '21 19:12 fragger42

I propose the patch in my pull request to fix the first part. For the second part, I unfortunately don't have a clue on my own how to do this.

fragger42 avatar Dec 31 '21 17:12 fragger42

Implemented the first part

bropat avatar Feb 05 '22 21:02 bropat

If you want to add authentication, add authentication middleware to your Express instance or run NGINX in front of Express instance.

bropat avatar Dec 03 '23 09:12 bropat