Skip to content
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

restricted users for event notification not working #391

Closed
mafalb opened this issue Nov 25, 2016 · 9 comments
Closed

restricted users for event notification not working #391

mafalb opened this issue Nov 25, 2016 · 9 comments
Labels

Comments

@mafalb
Copy link

mafalb commented Nov 25, 2016

Platform & OS Version
Windows 7

The version of the app you are reporting:
1.2.28

What is the nature of your issue
Bug

Details
I do have a zoneminder installation with 50+ cameras. zmtrigger.pl catches tcp notification from the cameras and begins to record. I also have a user who does have permissions to 3 cameras. When I start zmninja, zmeventnotification tells me in the log (I enhanced the logging slightly)

23/11/16 19:10:25.612524 zmeventnotification[61791].INF [Checking alarm
rules for 10.246.224.222:50794]
23/11/16 19:10:25.612911 zmeventnotification[61791].INF [monlist: ]
23/11/16 19:10:25.613288 zmeventnotification[61791].INF [monlist: for
10.246.224.222:50794: ]

Events for every Camera is coming to zmninja (and thats a lot). I would have expected that only events for the 3 cameras are coming through.

If I go to Settings -> Save then the log messages changes

23/11/16 19:11:40.613926 zmeventnotification[61791].INF [Checking alarm
rules for 10.246.224.222:50794]
23/11/16 19:11:40.614554 zmeventnotification[61791].INF [monlist: 1,2,3]
23/11/16 19:11:40.615179 zmeventnotification[61791].INF [monlist: for
10.246.224.222:50794: 1,2,3]

and after that only events from the specified cameras for that user are communicated to zmninja, it seems, which is the expected behaviour.

I think the initial authorisation goes wrong.

@pliablepixels
Copy link
Member

Yup - correct. As of today, the event server does not filter events based on user permissions - it directly picks up alarms from shared memory for performance. The workaround, as you've discovered is to force specify the monitor list via zmNinja - this should be done by default, which I'll fix.

@pliablepixels pliablepixels changed the title restricted users not working restricted users for event notification not working Nov 25, 2016
@pliablepixels
Copy link
Member

hopefully fixed - please reopen if its not fixed in next release

@mafalb
Copy link
Author

mafalb commented Nov 26, 2016

Thank you
I will try it...

@mafalb
Copy link
Author

mafalb commented Dec 7, 2016

tried v1.2.30, the bug still exists

@pliablepixels pliablepixels reopened this Dec 7, 2016
@pliablepixels
Copy link
Member

Please do this:

  1. In zmNinja, disable event server, hit save

  2. In zmNinja clear logs

  3. In zmNinja, make sure debug logs are on, then kill the app

  4. Stop zmeventserver

  5. Empty out /etc/private/tokens.txt (don't delete it)

  6. Start zmeventserver, and tail the logs (tail -f /var/log/syslog | grep zmeventserver)

  7. Start zmNinja

  8. Enable event server

Please post Debug logs of zmNinja and logs from zmeventserver

@pliablepixels
Copy link
Member

actually never mind - I think I found the bug.

@pliablepixels
Copy link
Member

@pliablepixels
Copy link
Member

@mafalb - did you try with the latest APK update ? You also need the updated event server (need to restart event server)

@pliablepixels
Copy link
Member

closing - assuming resolved. Please re-open if it still is an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants