Page 1 of 1

401 error with Nagstamon after loggin into CCM

Posted: Tue Jul 19, 2011 3:44 pm
by awoodewh
Hoping this belongs in the core section:

For this one particular user, when we create a user/pass entry in /usr/local/nagiosxi/etc/htpasswd.users, when he configures Nagstamon it works fine. As soon as he logs into NagiosXI, then the Core Configuration Manager, he gets a 401 (Authorization Required) error in Nagstamon. This doesn't happen for any other user...but to compound the strange behavior, this was happening on our NagiosXI 2009 server, and now is happening on the NagiosXI 2011 server. No users were migrated, all were created new, and it is happening with the same user.

I decoded the Basic Auth, and the user/pass are correct. If he configures Nagstamon with a different user and then logs into the CCM, the problem does not occur.

Any ideas, or have you seen this one before?

GET /nagios/cgi-bin/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12&hostprops=0 HTTP/1.1
Accept-Encoding: identity
Host: nagiosxi.edgewebhosting.net
Connection: close
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxx
User-Agent: Python-urllib/2.7


HTTP/1.1 401 Authorization Required
Date: Tue, 19 Jul 2011 20:29:30 GMT
Server: Apache/2.2.3 (Red Hat)
WWW-Authenticate: Basic realm="Nagios Core"
Content-Length: 494
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.2.3 (Red Hat) Server at nagiosxi.edgewebhosting.net Port 80</address>
</body></html>

Re: 401 error with Nagstamon after loggin into CCM

Posted: Wed Jul 20, 2011 9:25 am
by mguthrie
That is a bit strange. Before we start, I've never used Nagstamon, so I'm not sure how it works. However, this seems isolated to an Auth issue with nagios.

What are the specific URLs that this user is attempting to access, can you show me both the ones that are working and the ones that aren't?

Re: 401 error with Nagstamon after loggin into CCM

Posted: Wed Jul 20, 2011 3:55 pm
by awoodewh
Nagstamon has 2 URLs in its config:

Server URL:
https://nagiosxi.edgewebhosting.net/nagios

Server CGI URL:
https://nagiosxi.edgewebhosting.net/nagios/cgi-bin

When he logs into https://nagiosxi.edgewebhosting.net/nagiosxi, then CCM (Configure), and that's when it breaks Nagstamon. Our 20 or so other users do not have this issue, and it happens on any host on which he is logged in.

The odd part is that the Nagstamon credentials are stored in its own htaccess file, and I validated that if I have a different set of credentials for Nagstamon that the CCM and Nagstamon do not interfere with each other. Though this particular user was using the same user/pass for all 3 logins.

Thanks,
Andy

Re: 401 error with Nagstamon after loggin into CCM

Posted: Thu Jul 21, 2011 12:27 pm
by mguthrie
Just to make sure, can this user successfully login to the CCM when he's not using Nagstamon? Nagios XI and the CCM are both session-based authentication, so I'm not sure if that's throwing an issue somewhere.

Re: 401 error with Nagstamon after loggin into CCM

Posted: Tue Jul 26, 2011 3:14 pm
by awoodewh
Yes, the web authentication is always successful. It's as soon as he logs into CCM, Nagstmon throuws a 401 error....even though it is sending the proper credentials.

This happens on any system he logs in, and it is only this 1 user that is having the issue, It happened in XI 2009 and 2011.

Re: 401 error with Nagstamon after loggin into CCM

Posted: Thu Jul 28, 2011 9:25 am
by mguthrie
Just out of curiousity, are there special characters in this person's username or password? Maybe try only alpha-numeric characters?