Page 1 of 1
Pass User/Password in URL for Login
Posted: Mon Jan 12, 2015 1:23 pm
by mikew
I have a customer that has several applications that they want to integrate with Nagios XI in their application interface. What they need is a URL built for a read only user so the URL will need to pass the user and password.
The need is for several read only users so the auto-login is not enough. Is there a way to pass the user and password in the URL?
Re: Pass User/Password in URL for Login
Posted: Mon Jan 12, 2015 5:29 pm
by tgriep
Are you looking for something like the "Backend API URL" component?
If not, could you describe what they are looking for?
Re: Pass User/Password in URL for Login
Posted: Mon Jan 12, 2015 5:30 pm
by lmiltchev
Perhaps they can try using the Nagios XI Backend API URL component. They can create a read-only user, then in the backend API URL component's settings, grab the "username" and "ticket" portion of the URL and use it to access the data. Is this something that you are looking for or I am missing the point?
Re: Pass User/Password in URL for Login
Posted: Mon Jan 12, 2015 9:32 pm
by mikew
I have tried to use the backend API but I cannot get it work. For example if I wanted to connect to BPI the link is:
https://ip_address/nagiosxi/includes/components/nagiosbpi/index.php
The API uses &username=nagios_read&ticket=bunchofstuff...guess I cannnot figure out the exact string for connecting the two.
Re: Pass User/Password in URL for Login
Posted: Mon Jan 12, 2015 10:07 pm
by mikew
Looks like I figured it out with the backend API, still tesing but I will update the status. Here is what I did:
Locate the URL I want:
Code: Select all
http://server_ip/nagiosxi/includes/components/nagiosbpi/index.php
Use the backend APi to get the user and ticket info:
Code: Select all
?&username=someuser&ticket=fgsgm29aamd73attena3dnin6n2cc5brk7b86ihe8ri83f3h4che2235998ghcg
Combine the two:
Code: Select all
http://server_ip/nagiosxi/includes/components/nagiosbpi/index.php?&username=someuser&ticket=fgsgm29aamd73attena3dnin6n2cc5brk7b86ihe8ri83f3h4che2235998ghcg
Thanks for your help as always......
Re: Pass User/Password in URL for Login
Posted: Tue Jan 13, 2015 9:51 am
by scottwilkerson
That is correct.
There are only a few pages I recall that this will not work on, but by in large it can be used.
Re: Pass User/Password in URL for Login
Posted: Tue Jan 13, 2015 10:17 am
by mikew
You can close this...thanks guys for your help....