Pass Creds to NagVis
Pass Creds to NagVis
We are trying to use nagvis with xi to pass creds from the logged in user in nagiosxi to the nagvis server. Nagvis documentation says to use the "remote_user" env variable to do this. it does not seem that nagiosxi sets this as an available variable for us to call in the session to redirect the username. we also see that for the login identification you are using $_SESSION['username'] in your php. we tried setting this as the variable to pass to nagvis and it also fails. It is quite cumbersome to not have trusted auth with nagvis and to force our users to login twice. Is there any nagios documentation on setting this up or plugins to do so?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Pass Creds to NagVis
Can you read this post to see if this is the answer to your problem:
https://support.nagios.com/forum/viewto ... f=6&t=9550
https://support.nagios.com/forum/viewto ... f=6&t=9550
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Pass Creds to NagVis
this does not answer my question. i do not want to hardcode a user nagiosadmin. i want to pass the current user like $_SESSION['username'] or $_SESSION['REMOTE_USER'] but it does not seem like you are populating them.
Re: Pass Creds to NagVis
Nagiosxi 5.2.0
Nagvis 1.8.5
Nagvis 1.8.5
Re: Pass Creds to NagVis
That would truly be a nice feature. I need to log in twice several times a day... And also getting complaints from users who dont understand why.
Oh did you upgrade your NagVis successfully? You are on 1.8! How did you do it?
Oh did you upgrade your NagVis successfully? You are on 1.8! How did you do it?
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Pass Creds to NagVis
Not possible to do securely.
Do you care about security? If not then it may be possible by means of adjusting the NagVis link to include your username and password. The problem is we'd have to make your cleartext XI (and possibly AD if that's the case) available in the UI. I'm being a bit facetious just saying that "it may be possible" - we'd never actually do that.
The problem is it's basic http auth for multiple sites. The data can't be passed from one to the other:
http://stackoverflow.com/questions/3392 ... le-sign-on
Do you care about security? If not then it may be possible by means of adjusting the NagVis link to include your username and password. The problem is we'd have to make your cleartext XI (and possibly AD if that's the case) available in the UI. I'm being a bit facetious just saying that "it may be possible" - we'd never actually do that.
The problem is it's basic http auth for multiple sites. The data can't be passed from one to the other:
http://stackoverflow.com/questions/3392 ... le-sign-on
Re: Pass Creds to NagVis
i found a workaround by altering the nagvis.conf. This allows you to use two host headers and allow readonly access via one to all users and then prompt for auth for the other.
SetEnvIf Host "domain1\.com" require_auth=true
SetEnvIf Host "domain2\com" REMOTE_USER=readonly-account
AuthName "NagVis Access"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Order Deny,Allow
Deny from all
Satisfy any
Require valid-user
Allow from env=!require_auth
SetEnvIf Host "domain1\.com" require_auth=true
SetEnvIf Host "domain2\com" REMOTE_USER=readonly-account
AuthName "NagVis Access"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Order Deny,Allow
Deny from all
Satisfy any
Require valid-user
Allow from env=!require_auth
Re: Pass Creds to NagVis
Thanks for sharing your work around. Can I make this thread as solved, and close it out now?
Former Nagios Employee
Re: Pass Creds to NagVis
yes, please resolve it