Hi,
I’ve tried access the URL directly using the backend ticket from the Backend API URL component. It seems that I can see all the hosts/ services regardless of what had been authorized for the specific user.
For eg: I have used the backend login hash for a user called “test” that has been authorized to view certain services. But when I browse to the following URL, I could see all the host/serivces
https://<nagios-host>/nagiosxi/includes/components/xicore/status.php?show=services?username=test&ticket=gdddlq
Thanks
Inline login for nagios xi issue
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Inline login for nagios xi issue
Had you logged out of the administrator account prior to using this URL to access the test user? I was not able to recreate this here unless I was still logged into the administrator's account.
-
- Posts: 120
- Joined: Tue Aug 21, 2012 9:29 am
Re: Inline login for nagios xi issue
Yes I've logged in before as an admin acct. Once I logged out, and browse again to the URL, I've got " Your session has timed out" error
Thanks
Thanks
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am
Re: Inline login for nagios xi issue
The problem is in the URL, you have two question marks, so the credentials are being ignored.
https://<nagios-host>/nagiosxi/includes/components/xicore/status.php?show=services?username=test&ticket=gdddlq
https://<nagios-host>/nagiosxi/includes/components/xicore/status.php?show=services?username=test&ticket=gdddlq
-
- Posts: 120
- Joined: Tue Aug 21, 2012 9:29 am
Re: Inline login for nagios xi issue
I've tried again after replacing 2nd "?" with "&", still getting the same error.
https://<nagios-host>/nagiosxi/includes/components/xicore/status.php?show=services&username=test&ticket=gdddlq
Do users need to have certain privileges to execute those phps?
Thanks
https://<nagios-host>/nagiosxi/includes/components/xicore/status.php?show=services&username=test&ticket=gdddlq
Do users need to have certain privileges to execute those phps?
Thanks
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am
Re: Inline login for nagios xi issue
Same results on my machine. I don't think that page is setup to currently accept a backend ticket. It the auto-login feature a possibility for your scenario?
[EDIT]: From looking into this further, this is actually a result of some code we recently added. I'll post a patch shortly that you can add that will be in the 1.2 release that will allow this login method to work. (1.1 is posting this morning, so it won't be until the next release).
[EDIT]: From looking into this further, this is actually a result of some code we recently added. I'll post a patch shortly that you can add that will be in the 1.2 release that will allow this login method to work. (1.1 is posting this morning, so it won't be until the next release).
Last edited by mguthrie on Fri Oct 26, 2012 9:37 am, edited 2 times in total.
Reason: Addd more info
Reason: Addd more info
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am
Re: Inline login for nagios xi issue
Patch to make the inline login work (this will be in the 1.2 release):
Edit: /usr/local/nagiosxi/html/includes/utils.inc.php
Change line 108 from:
To:
Edit: /usr/local/nagiosxi/html/includes/utils.inc.php
Change line 108 from:
Code: Select all
if($lock)
Code: Select all
if($lock && !isset($_REQUEST['ticket']))
-
- Posts: 120
- Joined: Tue Aug 21, 2012 9:29 am
Re: Inline login for nagios xi issue
after code change, it worked. Thanks so much