{"id":76,"date":"2011-11-18T20:48:58","date_gmt":"2011-11-18T19:48:58","guid":{"rendered":"http:\/\/kloppholz.de\/wordpress\/?p=76"},"modified":"2013-01-27T13:53:53","modified_gmt":"2013-01-27T12:53:53","slug":"icinga-qd-how-to-authentificate-the-icinga-classic-ui-with-active-directory","status":"publish","type":"post","link":"http:\/\/kloppholz.de\/wordpress\/?p=76","title":{"rendered":"Icinga &#8211; Q&#038;D  &#8211; How to authentificate the ICINGA classic ui with Active Directory"},"content":{"rendered":"<p>Requirements:<\/p>\n<p>&#8211; Apache 2 (with Apache modules for LDAP Authentification called &#8222;libapache2-mod-vhost-ldap&#8220; and &#8222;libapache2-mod-ldap-userdir&#8220;)<\/p>\n<p>&#8211; Installed Icinga Version<\/p>\n<p>&#8211; the Path are for Debian &#8211; It shoud be the some on moste Linux Systems<\/p>\n<p>&nbsp;<\/p>\n<p>To Authentificate to an AD Server you need the following things FROM the Server &#8211; and &#8211; Actualy its plain LDAP not SSL !<\/p>\n<p>&#8211; Servername<\/p>\n<p>&#8211; The complete Domain Name<\/p>\n<p>&#8211; you should have a User who can Read on Ldap Server<\/p>\n<p>&#8211; A Group to Put your Icinga Users into<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Then open the Apache Config for Icinga. On a Debian System it is located at<\/p>\n<blockquote><p>\/etc\/apache2\/conf.d\/icinga.conf<\/p><\/blockquote>\n<p>the config looks like this (not exactly the Same but its an old System \ud83d\ude09 :<\/p>\n<p>&nbsp;<\/p>\n<blockquote><p># SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER<br \/>\n#<br \/>\n# This file contains examples of entries that need<br \/>\n# to be incorporated into your Apache web server<br \/>\n# configuration file.\u00a0 Customize the paths, etc. as<br \/>\n# needed to fit your system.<\/p>\n<p>ScriptAlias \/icinga\/cgi-bin &#8222;\/usr\/local\/icinga\/sbin&#8220;<br \/>\n#ScriptAlias \/nagios\/cgi-bin &#8222;\/usr\/local\/icinga\/sbin&#8220;<br \/>\n#alias \/nagvis\u00a0\u00a0 &#8222;\/usr\/local\/nagios\/share\/nagvis&#8220;<br \/>\n#Alias \/nagios &#8222;\/usr\/local\/icinga\/share\/&#8220;<br \/>\n#Alias \/nagios3 &#8222;\/usr\/local\/icinga\/share\/&#8220;<\/p>\n<p>&lt;Directory &#8222;\/usr\/local\/icinga\/sbin&#8220;&gt;<br \/>\n#\u00a0 SSLRequireSSL<br \/>\nOptions ExecCGI<br \/>\nAllowOverride None<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\n#\u00a0 Order deny,allow<br \/>\n#\u00a0 Deny from all<br \/>\n#\u00a0 Allow from 127.0.0.1<br \/>\n<strong><\/strong><br \/>\n&lt;\/Directory&gt;<br \/>\nAlias \/icinga &#8222;\/usr\/local\/icinga\/share\/&#8220;<\/p>\n<p>&lt;Directory &#8222;\/usr\/local\/icinga\/share\/&#8220;&gt;<br \/>\n#\u00a0 SSLRequireSSL<br \/>\nOptions None<br \/>\nAllowOverride None<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\n#\u00a0 Order deny,allow<br \/>\n#\u00a0 Deny from all<br \/>\n#\u00a0 Allow from 127.0.0.1<\/p>\n<p><strong><\/strong><br \/>\n&lt;\/Directory&gt;<\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p>&#8212;<\/p>\n<p>You now have to add the following strings to you config into the &lt;Directory&gt; Statements :<\/p>\n<p>&nbsp;<\/p>\n<p><strong>AuthName &#8222;Restricted&#8220;<\/strong><\/p>\n<p><em>## AuthName:\u00a0 &#8211; the Name for the Authentification window<\/em><br \/>\n<strong>AuthType Basic<\/strong><\/p>\n<p><em>## AuthType :\u00a0 &#8211; Asks for Username an Password<\/em><br \/>\n<strong>AuthLDAPURL &#8222;<a href=\"\">ldap:\/\/----escape_sem_autolink_uri:1158<\/a>f9d4f51659c5e8b3c48996265210----:389\/cn=Users,dc=[DOMAIN],dc=[TOPLEVELDOMAIN]?samAccountName?sub?(objectCategory=person)&#8220;<\/strong><br \/>\n<strong><\/strong><em>## AuthLDAPURL : This is your Query String &#8211; Where can the LDAP Server Reached and how to ask him about your Data and whitch Object are used (AD contains a loot of Objects like &#8222;computer&#8220; or something &#8211; It sould be logical to use &#8222;person&#8220;)<br \/>\n<\/em><\/p>\n<p><em>[YOURLDAPSERVER] : Your Domain Controller<\/em><\/p>\n<p><em>[DOMAIN] : if your AD Name is &#8222;FOO.BAA&#8220; &#8211; Domain iss &#8222;FOO&#8220;<\/em><\/p>\n<p><em>[TopLEVELDOMAIN] : if your AD Name is &#8222;FOO.BAA&#8220; &#8211; the Topleveldomain iss &#8222;BAA&#8220;<\/em><\/p>\n<p><strong>AuthLDAPBindDN &#8222;CN=[USERNAME FROM ADS],OU=[YOUR OU],DC=[DOMAIN],DC=[TOPLEVELDOMAIN]&#8220;<\/strong><\/p>\n<p><em>## AuthLDAPURL: &#8211; you LDAP Lookup User to connect to the AD and query your Authentification String<\/em><\/p>\n<p><em>[USERNAME FROM ADS] : If the Name of the Object is &#8222;JOHN DOW&#8220; you shold COPY THE NAME DISPLAYED IN AD MANAGER INTO THIS FIELD<\/em><\/p>\n<p><em>[YOUR OU]: This is the Organisation Unit, your Lookup User is Stored into &#8211; Mostly its &#8222;System Users&#8220; or something else (without Quotes)<\/em><\/p>\n<p><em>[DOMAIN] : if your AD Name is &#8222;FOO.BAA&#8220; &#8211; Domain iss &#8222;FOO&#8220;<\/em><\/p>\n<p><em>[TopLEVELDOMAIN] : if your AD Name is &#8222;FOO.BAA&#8220; &#8211; the Topleveldomain iss &#8222;BAA&#8220;<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>for Example the AuthLDAPBindDN looks like this:<\/p>\n<p><em>AuthLDAPBindDN &#8222;CN=John Dow,OU=System Users,DC=FOO,DC=BAA&#8220;<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><strong>AuthLDAPBindPassword &#8222;[password]&#8220;<\/strong><\/p>\n<p><em>## AuthLDAPBindPassword : its the password for the Lookup user<\/em><br \/>\n<strong>require valid-user<\/strong><\/p>\n<p><em># You Need a Valid User to enter&#8230;<\/em><br \/>\n<strong>AuthBasicProvider ldap<\/strong><\/p>\n<p><em># AuthBasicProvider : Use LDAP for Authentification<\/em><br \/>\n<strong>AuthzLDAPAuthoritative off<\/strong><\/p>\n<p>#<br \/>\n<strong>require ldap-group &#8222;CN=[Group],OU=[OrgaUnit],DC=[DOMAIN,DC=[TOPLEVELDOMAIN]&#8220;<\/strong><\/p>\n<p><em>#require ldap-group : the User who wants to logon to you Icinga Server must place into this security Group in the ADS<\/em><\/p>\n<p><em>[Group] : this is the Groupname showd in AD Manager &#8211; Don&#8217;t know why, dont use Blanks.<br \/>\n<\/em><\/p>\n<p><em>[YOUR OU]: This is the Organisation Unit, your Lookup User is Stored into &#8211; Mostly its &#8222;System Users&#8220; or something else (without Quotes)<\/em><\/p>\n<p><em>[DOMAIN] : if your AD Name is &#8222;FOO.BAA&#8220; &#8211; Domain iss &#8222;FOO&#8220;<\/em><\/p>\n<p><em>[TopLEVELDOMAIN] : if your AD Name is &#8222;FOO.BAA&#8220; &#8211; the Topleveldomain iss &#8222;BAA&#8220;<\/em><\/p>\n<p>&nbsp;<\/p>\n<blockquote><p>#####################################<\/p>\n<p>After Adding this your config should look like these:<\/p>\n<p>&nbsp;<\/p>\n<p># SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER<br \/>\n#<br \/>\n# This file contains examples of entries that need<br \/>\n# to be incorporated into your Apache web server<br \/>\n# configuration file.\u00a0 Customize the paths, etc. as<br \/>\n# needed to fit your system.<\/p>\n<p>ScriptAlias \/icinga\/cgi-bin &#8222;\/usr\/local\/icinga\/sbin&#8220;<br \/>\n#ScriptAlias \/nagios\/cgi-bin &#8222;\/usr\/local\/icinga\/sbin&#8220;<br \/>\n#alias \/nagvis\u00a0\u00a0 &#8222;\/usr\/local\/nagios\/share\/nagvis&#8220;<br \/>\n#Alias \/nagios &#8222;\/usr\/local\/icinga\/share\/&#8220;<br \/>\n#Alias \/nagios3 &#8222;\/usr\/local\/icinga\/share\/&#8220;<\/p>\n<p>&lt;Directory &#8222;\/usr\/local\/icinga\/sbin&#8220;&gt;<br \/>\n#\u00a0 SSLRequireSSL<br \/>\nOptions ExecCGI<br \/>\nAllowOverride None<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\n#\u00a0 Order deny,allow<br \/>\n#\u00a0 Deny from all<br \/>\n#\u00a0 Allow from 127.0.0.1<br \/>\n<strong><\/strong>AuthName &#8222;Restricted&#8220;<br \/>\nAuthType Basic<br \/>\nAuthLDAPURL &#8222;<a href=\"\">ldap:\/\/----escape_sem_autolink_uri:1158<\/a>f9d4f51659c5e8b3c48996265210----:389\/cn=Users,dc=[DOMAIN],dc=[TOPLEVELDOMAIN]?samAccountName?sub?(objectCategory=person)&#8220;<br \/>\nAuthLDAPBindDN &#8222;CN=[USERNAME FROM ADS],OU=[YOUR OU],DC=[DOMAIN],DC=[TOPLEVELDOMAIN]&#8220;<br \/>\nAuthLDAPBindPassword &#8222;[password]&#8220;<br \/>\nrequire valid-user<br \/>\nAuthBasicProvider ldap<br \/>\nAuthzLDAPAuthoritative off<br \/>\nrequire ldap-group &#8222;CN=[Group],OU=[OrgaUnit],DC=[DOMAIN,DC=[TOPLEVELDOMAIN]&#8220;<\/p>\n<p>&lt;\/Directory&gt;<br \/>\nAlias \/icinga &#8222;\/usr\/local\/icinga\/share\/&#8220;<\/p>\n<p>&lt;Directory &#8222;\/usr\/local\/icinga\/share\/&#8220;&gt;<br \/>\n#\u00a0 SSLRequireSSL<br \/>\nOptions None<br \/>\nAllowOverride None<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\n#\u00a0 Order deny,allow<br \/>\n#\u00a0 Deny from all<br \/>\n#\u00a0 Allow from 127.0.0.1<br \/>\nAuthName &#8222;Restricted&#8220;<br \/>\nAuthType Basic<br \/>\nAuthLDAPURL &#8222;<a href=\"\">ldap:\/\/----escape_sem_autolink_uri:1158<\/a>f9d4f51659c5e8b3c48996265210----:389\/cn=Users,dc=[DOMAIN],dc=[TOPLEVELDOMAIN]?samAccountName?sub?(objectCategory=person)&#8220;<br \/>\nAuthLDAPBindDN &#8222;CN=[USERNAME FROM ADS],OU=[YOUR OU],DC=[DOMAIN],DC=[TOPLEVELDOMAIN]&#8220;<br \/>\nAuthLDAPBindPassword &#8222;[password]&#8220;<br \/>\nrequire valid-user<br \/>\nAuthBasicProvider ldap<br \/>\nAuthzLDAPAuthoritative off<br \/>\nrequire ldap-group &#8222;CN=[Group],OU=[OrgaUnit],DC=[DOMAIN,DC=[TOPLEVELDOMAIN]&#8220;<\/p>\n<p>&lt;\/Directory&gt;<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>it sould be done.<\/p>\n<p>if i forgot something, please use the comments below.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Requirements: &#8211; Apache 2 (with Apache modules for LDAP Authentification called &#8222;libapache2-mod-vhost-ldap&#8220; and &#8222;libapache2-mod-ldap-userdir&#8220;) &#8211; Installed Icinga Version &#8211; the Path are for Debian &#8211; It shoud be the some on moste Linux Systems &nbsp; To Authentificate to an AD Server you need the following things FROM the Server &#8211; and &#8211; Actualy its plain [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-76","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-allgemein","7":"czr-hentry"},"_links":{"self":[{"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76"}],"version-history":[{"count":7,"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/76\/revisions"}],"predecessor-version":[{"id":118,"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/76\/revisions\/118"}],"wp:attachment":[{"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kloppholz.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}