Nagios core 4.4.13 Multi Domain Authentication

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
gigabitns
Posts: 1
Joined: Thu Sep 30, 2021 6:54 pm

Nagios core 4.4.13 Multi Domain Authentication

Post by gigabitns »

Hi
I am currently working with a client in a multi domain AD environment where the bind address is in the child domain and we need to auth users to nagios from the parent domain. Currently we just get the login window constantly opening.

Any advice on if this is possible would be appreciated

My nagios.conf file is currently

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
#        Require host 127.0.0.1

         AuthName "Nagios Access"
         AuthType Basic


		AuthBasicProvider ldap
		AuthLDAPURL ldap://10.1.1.50:389/dc=child,dc=domain,dc=com?sAMAccountName?sub?(objectClass=*)
		AuthLDAPBindDN "CN=nagiossvc,OU=Service Accounts,dc=child,dc=domain,dc=com"
		AuthLDAPBindPassword servicepassword

#         AuthUserFile /usr/local/nagios/etc/htpasswd.users
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     Deny from all
#     Allow from 127.0.0.1

      AuthName "Nagios Access"
      AuthType Basic

		AuthBasicProvider ldap
		AuthLDAPURL ldap://10.1.1.50:389/dc=child,dc=domain,dc=com?sAMAccountName?sub?(objectClass=*)
		AuthLDAPBindDN "CN=nagiossvc,OU=Service Accounts,dc=child,dc=domain,dc=com"
		AuthLDAPBindPassword servicepassword

#      AuthUserFile /usr/local/nagios/etc/htpasswd.users
      Require valid-user
   </IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
#        Require host 127.0.0.1

         AuthName "Nagios Access"
         AuthType Basic


		AuthBasicProvider ldap
		AuthLDAPURL ldap://10.1.1.50:389/dc=child,dc=domain,dc=com?sAMAccountName?sub?(objectClass=*)
		AuthLDAPBindDN "CN=nagiossvc,OU=Service Accounts,dc=child,dc=domain,dc=com"
		AuthLDAPBindPassword servicepassword

#         AuthUserFile /usr/local/nagios/etc/htpasswd.users
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     Deny from all
#     Allow from 127.0.0.1

      AuthName "Nagios Access"
      AuthType Basic

		AuthBasicProvider ldap
		AuthLDAPURL ldap://10.1.1.50:389/dc=child,dc=domain,dc=com?sAMAccountName?sub?(objectClass=*)
		AuthLDAPBindDN "CN=nagiossvc,OU=Service Accounts,dc=child,dc=domain,dc=com"
		AuthLDAPBindPassword servicepassword

#      AuthUserFile /usr/local/nagios/etc/htpasswd.users
      Require valid-user
   </IfVersion>
</Directory>

User avatar
danderson
Posts: 111
Joined: Wed Aug 09, 2023 10:05 am

Re: Nagios core 4.4.13 Multi Domain Authentication

Post by danderson »

Thanks for reaching out @gigabitns,

https://serverfault.com/questions/31228 ... uthn-alias
https://stackoverflow.com/questions/496 ... via-apache

I found some possible resources that might help.

Let me know if you still need further guidance.
Post Reply