Apache Digest authe...
 
Notifications
Clear all

Apache Digest authentication

6 Posts
3 Users
0 Reactions
4,996 Views
230dac1117c61c216398025d641fef7664053509e251cbc52ac991b139a4658b?s=80&d=mm&r=g
Posts: 5
Topic starter
(@travis-bean)
Active Member
Joined: 3 months ago

I followed the example in /etc/nagios4/apache2.conf to enable Digest authentication. I added the following into <DirectoryMatch>:

  AuthDigestDomain "Nagios"

  AuthDigestProvider file

  AuthUserFile "/etc/apache2/.htpasswd.users"

  AuthGroupFile "/etc/groups"

  AuthName "Nagios Login"

  AuthType Digest

  Require valid-user

I do not get the login prompt when accessing localhost/nagios4. Am I missing something? I even tried to surround the above-mentioned code with <RequireAll></RequireAll> and to no avail.

 

5 Replies
260ccdbc047486f18ae6ead6f4559730d09e073c497c17896a6aff5a0fbe9fd8?s=80&d=mm&r=g
Posts: 11
Admin
(@rarafa)
Member
Joined: 10 months ago

Which product are you using? Is this on Nagios CSP, Nagios core, or Nagios XI?

Please follow the steps outlined in this document on Implementing Digest Authentication - https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/cgisecurity.html

Reply
230dac1117c61c216398025d641fef7664053509e251cbc52ac991b139a4658b?s=80&d=mm&r=g
Posts: 5
Topic starter
(@travis-bean)
Active Member
Joined: 3 months ago

I am running Nagios core.

I used the following code to create an /etc/apache/conf-available/nagios.conf file and enabled it with a2enconf:

ScriptAlias /nagios/cgi-bin "/usr/sbin/nagios4"
<Directory "/usr/sbin/nagios4">
  Options ExecCGI
  AllowOverride None
  Order allow,deny
  Allow from all
  AuthType Digest
  AuthName "Nagios Access"
  AuthUserFile "/etc/apache2/.htpasswd.users"
  Require valid-user
</Directory>
Alias /nagios "/usr/share/nagios"
<Directory "/usr/share/nagios">
  Options None
  AllowOverride None
  Order allow,deny
  Allow from all
  AuthType Digest
  AuthName "Nagios Access"
  AuthUserFile "/etc/apache2/.htpasswd.users"
  Require valid-user
</Directory>

This does not work.

I need the paths verified for "ScriptAlias," "Alias," and "<Directory>" since these reference "/usr/local" in the Enhanced CGI Security and Authentication tutorial, and /usr/local does not pertain to my installation.

Reply
260ccdbc047486f18ae6ead6f4559730d09e073c497c17896a6aff5a0fbe9fd8?s=80&d=mm&r=g
Posts: 11
Admin
(@rarafa)
Member
Joined: 10 months ago

If this is related to core please use the following forum to post this question - https://support.nagios.com/forum/viewforum.php?f=7

Reply
230dac1117c61c216398025d641fef7664053509e251cbc52ac991b139a4658b?s=80&d=mm&r=g
Posts: 5
Topic starter
(@travis-bean)
Active Member
Joined: 3 months ago

The following Enhanced CGI Security and Authentication tutorial for Nagios needs to be updated and fixed: https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/cgisecurity.html

The syntax in this tutorial is for outdated Apache 2.2; therefore, it needs to be updated to Apache 2.4 syntax.

For example:

Order allow,deny

Allow from all

needs to be replaced with:

Require all granted

also

AuthDigestFile

needs to be replaced with:

AuthUserFile

 

 

 

 

 

Reply
1 Reply
4618621cad0557d04ea115c17c9b53afe90beefed335c33c73919c5b8bbc3d1b?s=80&d=mm&r=g
Admin
(@sandor)
Joined: 10 months ago

Member
Posts: 32

@travis-bean Thanks for bringing that to our attention. I'll make a note of it and notify the team tracking our documentation that needs updating. In the mean time if there are more core related questions, like @rarafa mentioned above you may find more traction on our core specific forums.

Reply
Share: