Hello @jofemodo
I’m Paulo and I am investigating the webconf auth for implements something similar in a project.
Point one
I observer that some methods have @tornado.web.authenticated, mostly get
.
Why post
methods haven’t? If it has a power for change the data, why it isn’t protected?
In other words, why do I need authentication to see current configuration, but I do not need to change settings in Zynthian?
Example:
GET
POST
Point two
Other point, I think that the cookie token need be random, not a deterministic and commited string
Tornado’s secure cookies guarantee integrity but not confidentiality. That is, the cookie cannot be modified but its contents can be seen by the user. The
cookie_secret
is a symmetric key and must be kept secret – anyone who obtains the value of this key could produce their own signed cookies.
Problems:
- https://github.com/zynthian/zynthian-webconf/blob/ec09ae3daa43eb462c18c382b7e5794d1551d249/lib/LoginHandler.py#L49
- https://github.com/zynthian/zynthian-webconf/blob/b79c0bf69d8e81a01f7bb9c8e0c5238a1682ee55/lib/WifiListHandler.py#L38
- others in https://github.com/zynthian/zynthian-webconf/search?utf8=✓&q=cookie&type=
Commentary
@guysoft had commented that it would add a hotspot to the Zynthian image. Today, if the application is insecure, there are no problems, because it is necessary to access the network of the device to carry out some attack.
However, with the implementation of the hotspot, more chances of attack. Imagine someone ruining your performance live!
I thought about this problem previously and the solution I considered was to add a led to blink if the network is in use and a button to activate / deactivate the hotspot.