zoneminder icon indicating copy to clipboard operation
zoneminder copied to clipboard

Unable to authenticate user (zms.cpp 212) - Cycle, Montage & Montage Review tabs affected

Open dwrobel opened this issue 7 years ago • 7 comments

Describe Your Environment

  • Version of ZoneMinder [release version, development version, or commit]
$ rpm -qv zoneminder
zoneminder-1.32.3-1.fc28.x86_64
  • How you installed ZoneMinder [e.g. PPA, RPMFusion, from-source, etc] Official fedora repo.
  • Full name and version of OS
$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	Fedora
Description:	Fedora release 28 (Twenty Eight)
Release:	28
Codename:	TwentyEight
  • Browser name and version (if this is an issue with the web interface)
rpm -qv firefox
firefox-65.0.2-1.fc28.x86_64
  • Relevant part of the config:
  • OPT_USE_AUTH - yes
  • AUTH_TYPE - builtin
  • AUTH_RELAY - hashed
  • AUTH_HASH_IPS - yes
  • AUTH_HASH_LOGINS - yes
  • OPT_USE_GOOG_RECAPTCHA - no
  • Apache HTTP server

Describe the bug On Cycle, Montage & Montage Review tabs I don't see a video. Interestingly all other tabs (e.g. Console, Options, Log) works fine (display relevant information). On the Log tab the error is:


2019-03-19 19:09:45 | zms_m2 |   | 22074 | ERR |  Unable to authenticate use | zms.cpp | 212
-- | -- | -- | -- | -- | -- | -- | --
2019-03-19 19:09:36 | zms_m1 |   | 22067 | ERR | Unable to authenticate user | zms.cpp | 212

but while I'm accessing any tabs the UI doesn't ask me for any authentication.

To Reproduce The phenomenon seems to be reproducible every time I'm following the scenario described below:

  1. Connect to the ZM being out of home.
  2. When back in home (usually after few hours) refresh the Firefox tab used to connect to ZM, then observe the situation as described beforehand.

Expected behavior Either every ZM tab should work (present it's data correctly) or none of them should provide any access to data prior asking user to re-authenticate.

Workaround Logout/login and Cycle, Montage & Montage Review tabs works again (display video).

dwrobel avatar Mar 19 '19 18:03 dwrobel

Are you performing each test from the same computer? If so, this is caused by AUTH_HASH_IPS being enabled. If the IP address of the client pc changes, then that breaks the hash that is generated. The reason zm appears to partially break, and not completely, is the authentication hash is only used when a stream is being sent to the client. It is not used anywhere else.

I agree certainly that this could be handled better. In the meantime, turning off AUTH_HASH_IPS should allow your client pc to work w/o issue after moving to a different ip network.

knight-of-ni avatar Mar 31 '19 12:03 knight-of-ni

I got something similar, but I can't see live view in any way. Not sure is the same thing though, so I opened a new issue: #2565

Giulio2333 avatar Apr 01 '19 09:04 Giulio2333

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 31 '19 09:05 stale[bot]

Are you performing each test from the same computer?

Yes, it's the same machine.

If so, this is caused by AUTH_HASH_IPS being enabled.

Disabling it helped.

Thank you for the hint.

dwrobel avatar May 31 '19 11:05 dwrobel

I have also tried disabling AUTH_HASH_IPS but that dit not work. Only setting AUTH_RELAY to NONE helped

tahphallus avatar Jun 24 '19 08:06 tahphallus

@tahphallus yours is a different issue

knight-of-ni avatar Jun 24 '19 12:06 knight-of-ni

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 23 '19 12:08 stale[bot]