Pass User/Password in URL for Login

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Pass User/Password in URL for Login

Post 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?
Mike Weber

Nagios Training/Consulting
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Pass User/Password in URL for Login

Post by tgriep »

Are you looking for something like the "Backend API URL" component?

If not, could you describe what they are looking for?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Pass User/Password in URL for Login

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Pass User/Password in URL for Login

Post 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.
Mike Weber

Nagios Training/Consulting
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Pass User/Password in URL for Login

Post 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......
Mike Weber

Nagios Training/Consulting
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Pass User/Password in URL for Login

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Pass User/Password in URL for Login

Post by mikew »

You can close this...thanks guys for your help....
Mike Weber

Nagios Training/Consulting
Locked