Page 1 of 1

NagVis Authorization

Posted: Wed Dec 18, 2019 7:30 pm
by TechnicallyTrue
Hello,
I've recently gotten NagVis 1.9 up and running on a CentOS 7 machine, and I'd like to allow authorization besides the built-in admin. There are options to do this in the file /etc/httpd/conf.d/nagvis.conf:

Code: Select all

   AuthName "NagVis Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
This is initially commented out, but according to the documentation uncommenting it should enable use of Nagios users. Trouble is, I've uncommented it and it still says Error: Authentication Failed for everyone but the "admin" user. I would like to be able to have LDAP authentication eventually, but for now I'll settle for being able to add any users.

On a semi-unrelated note: where does NagVis store the host definitions for hosts added through the web interface? When I look them up by name, they only show up in a bunch of cache files in the var directory.

Thank you very much.

Re: NagVis Authorization

Posted: Thu Dec 19, 2019 3:04 pm
by mbellerue
Your setup looks correct. Do you currently have Nagios tied to LDAP authentication?

Re: NagVis Authorization

Posted: Thu Dec 19, 2019 5:20 pm
by TechnicallyTrue
I do not. It currently only works with the default admin account. I tried configuring LDAP authentication the same way I did for the Nagios web interface, but alas, no luck.
I have also since tried uncommenting the lines

Code: Select all

logonmodule="LogonMixed"
logonenvvar="REMOTE_USER"
logonenvcreateuser="1"
in the file /usr/local/nagvis/etc/nagvis.ini.php, also to no effect.
Thank you very much.

Re: NagVis Authorization

Posted: Fri Dec 20, 2019 3:22 pm
by mbellerue
TechnicallyTrue wrote:I tried configuring LDAP authentication the same way I did for the Nagios web interface, but alas, no luck.
I'm wondering if Nagios being configured for LDAP is preventing NagVis from reading the htpasswd file properly. Could you create a new htpasswd file, maybe just htpasswd2, throw in a username and password, point NagVis to that, and see if you can login with that account.