-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "store surveillance user password as SHA1" #2944
Revert "store surveillance user password as SHA1" #2944
Conversation
Motion requires having plaintext password for stream_authentication in camera-*.conf files, and keeping the password hashed internally in ME isn't then possible. This reverts commit 14156d2.
Approved as per my post in the linked issue: If I am not mistaken, having the surveillance user password hashed, even if we did implement support for and store in MD5 digest format, supported by motion, motionEye itself requires it in plain text to authentication against motion, to process and show streams through its PR. I remember I indeed had issues using the surveillance user at all, also for motionEye UI, after assigning a password. That would explain it. So for now: Let's restore the previous working state. And we can think about enhancing security in another PR, when we find time. At least assuring 600 or 640 mode on all config files makes sense, so they are not world-readable, if this is not already the case. |
Well, ME could store the password hashed in main config ( |
The other way round, isn't it? It can be stored in hashed way in the camera/motion configs, but motionEye needs to access it in plain text somewhere, so it can authenticate at the motion instances to access/process the steams, to show them in the motionEye UI. Or which config/s is/are the ones motion compares passed passwords against? However, the result is the same. Let's get this merged and fixed the way it originally was. A better solution or other security measures can be applied in a follow up PR, if someone has a good idea and time to implement. |
Well, I didn't even think of how ME integrates with Motion, but we didn't notice any issues getting current camera frame to UI etc, did we? After some more looking at the code I'm not really understanding how hashing of Anyway, as long as Motion can't understand hashed password in camera-*.conf, that password needs to be stored in clear-text. For the rest we can do whatever we want, I suppose. |
I'll have a closer look at this when I find time. MJPEG cameras bypass motion, but else they are processed by motion. But probably ME can somehow bypass authentication as it starts the motion processes by itself. |
Motion requires having plaintext password for stream_authentication in camera-*.conf files, and keeping the password hashed internally in ME isn't then possible.
If someone has a better idea that allows storing passwords hashed, I'm ready to scrap this PR, but it doesn't seem possible due to lack of support from Motion.
This fixes #2813 . See the discussion there for more context.