View User with Limited Access does not work

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mopp
Posts: 64
Joined: Thu Aug 20, 2015 7:15 am

View User with Limited Access does not work

Post by mopp »

Hello,

I created a user with limited access (the option can see all objects objects is disabled). The user is only allowed to see a certain host.
When the user logs in to Nagios XI the user sees only the host and all its services.
But when the user clicks on the host or the service only a blank page is shown. When I check the HTTP Error Codes I see a HTTP Error 500

Nagios 5.3.3
Can anybody confirm this problem?
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: View User with Limited Access does not work

Post by eloyd »

Users who log in to the GUI are allowed to see anything for which they are configured to receive notifications (even if notifications are disabled). Not sure about your blank page though.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: View User with Limited Access does not work

Post by avandemore »

Can you attach or PM /var/log/*_log along with full browser screenshot of the blank page issue?

Has there been any alterations from default to Apache configs?
Previous Nagios employee
mopp
Posts: 64
Joined: Thu Aug 20, 2015 7:15 am

Re: View User with Limited Access does not work

Post by mopp »

Hello,

sorry for the delay. I attached the screenshots.
This is a screenshot from our test system. I' m logged in with a normal user.
Authorization Level: User
nagios_security.jpg
I assigned this contact only to the host.
nagios.jpg
I see the hosts and all services, but this AD test user is not in the notification list for the services. Only for the host.
It is possible to view the performance graph from the Host and the Services, which should not be possible for the services because I' m not in the notification list.
When I click on localhost I' ll get the error 500.
error_500.jpg
Regarding the log files. I attached the interessting parts here. Let me know if you need more.
This will appear when you click on the host and get the error 500.
error_log:

Code: Select all

[Tue Dec 13 09:24:09 2016] [error] [client 10.216.16.203] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 56 in /usr/local/nagiosxi/html/includes/components/objconfig/objconfig.inc.php on line 171, referer: http://testnagios.mydomain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Tue Dec 13 09:24:09 2016] [error] [client 10.216.16.203] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 57 in /usr/local/nagiosxi/html/includes/components/objconfig/objconfig.inc.php on line 171, referer: http://testnagios.mydomain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
[Tue Dec 13 09:24:09 2016] [error] [client 10.216.16.203] PHP Fatal error:  Call to a member function getElementsByTagName() on a non-object in /usr/local/nagiosxi/html/includes/components/objconfig/objconfig.inc.php on line 176, referer: http://testnagios.mydomain.com/nagiosxi/includes/components/xicore/status.php?show=hosts
access_log:

Code: Select all

10.123.123.123 - - [13/Dec/2016:09:24:03 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_pagetop_alert_content_html%22%2C%22args%22%3A%22%22%7D&nsp=0fee30a598ade0a4138b3d584db88c614c549604f700bced1812ace531f7d013 HTTP/1.1" 200 - "http://testnagios.mydomain.com/nagiosxi/index.php" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
10.12.12.12 - - [13/Dec/2016:09:24:08 +0100] "GET /nagiosxi/includes/components/nagioscore/ui/config.php?type=hosts&expand=localhost HTTP/1.0" 200 2898 "-" "-"
10.123.123.123 - - [13/Dec/2016:09:24:08 +0100] "GET /nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=localhost HTTP/1.1" 500 - "http://testnagios.mydomain.com/nagiosxi/includes/components/xicore/status.php?show=hosts" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
127.0.0.1 - - [13/Dec/2016:09:24:10 +0100] "POST /nagiosxi/backend/ HTTP/1.1" 200 1589 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
127.0.0.1 - - [13/Dec/2016:09:24:10 +0100] "POST /nagiosxi/backend/ HTTP/1.1" 200 1589 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: View User with Limited Access does not work

Post by lmiltchev »

It seems like the issue is caused by the object component that you installed in Nagios XI. I would assume that you are the author of the component below judging by the username:
https://exchange.nagios.org/directory/A ... on/details

It is possible that we introduced some changes in the newer versions of Nagios XI that caused the component to fail...

FYI, when I installed the component on my test XI box, I was able to reproduce the issue - clicking on the host would result in a blank page, and I would get errors as the one below:

Code: Select all

[Tue Dec 13 10:10:53.551553 2016] [:error] [pid 35090] [client 192.168.x.x:58864] PHP Fatal error:  Call to a member function getElementsByTagName() on a non-object in /usr/local/nagiosxi/html/includes/components/objconfig/objconfig.inc.php on line 174, referer: http://192.168.x.x/nagiosxi/includes/components/xicore/status.php?show=hosts
Removing the component fixed the issue for me. Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mopp
Posts: 64
Joined: Thu Aug 20, 2015 7:15 am

Re: View User with Limited Access does not work

Post by mopp »

Thanks for the hint, I was blind, just didn' t recognise the name.
I uploaded a new version of the component which will handle the situation with users with limited access
You can close this thread.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: View User with Limited Access does not work

Post by eloyd »

I'll have to go check out the component. Looks interesting.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: View User with Limited Access does not work

Post by rkennedy »

Awesome - are we good to mark this thread as resolved?
Former Nagios Employee
mopp
Posts: 64
Joined: Thu Aug 20, 2015 7:15 am

Re: View User with Limited Access does not work

Post by mopp »

rkennedy wrote:Awesome - are we good to mark this thread as resolved?
Yes, please close it.
Locked