{"id":103,"date":"2013-03-28T13:24:32","date_gmt":"2013-03-28T20:24:32","guid":{"rendered":"http:\/\/blogs.oregonstate.edu\/sig\/?p=103"},"modified":"2013-03-28T13:24:32","modified_gmt":"2013-03-28T20:24:32","slug":"enabling-ldap-authentication-in-zenoss-core-4-2-and-centos-6","status":"publish","type":"post","link":"https:\/\/dev.blogs.oregonstate.edu\/sig\/2013\/03\/28\/enabling-ldap-authentication-in-zenoss-core-4-2-and-centos-6\/","title":{"rendered":"Enabling LDAP Authentication in Zenoss Core 4.2+ and CentOS 6"},"content":{"rendered":"<p>This guide contains instructions for enabling LDAP authentication in Zenoss Core 4.2+ on a relatively clean install of CentOS 6 (64-bit).<\/p>\n<h3>Assumptions<\/h3>\n<ul>\n<li>you are running CentOS 6<\/li>\n<li>you have installed Zenoss Core 4.2+ using the <a href=\"https:\/\/github.com\/zenoss\/core-autodeploy\">autodeploy<\/a> script<\/li>\n<\/ul>\n<h3>Before You Begin<\/h3>\n<p>It&#8217;s recommended that you backup your Zenoss configuration, either through a VM snapshot (if that&#8217;s an option) or via the backup tool (Advanced -&gt; Backups). You may also want to back up your acl_users settings as follows:<\/p>\n<ol>\n<li>Go to <a href=\"https:\/\/YOUR_ZENOSS_SERVER\/zport\/manage\">https:\/\/YOUR_ZENOSS_SERVER\/zport\/manage<\/a> and log in as <code>admin<\/code>.<\/li>\n<li>Click <code>acl_users<\/code> in the tree view on the left side of the page.<\/li>\n<li>Click <code>Import\/Export<\/code>.<\/li>\n<li>Leave &#8220;Export object id&#8221; blank, select dumpfile location, then click <code>Export<\/code>.<\/li>\n<\/ol>\n<h3>Install Required Auth Plugins<\/h3>\n<p>Download <a href=\"https:\/\/pypi.python.org\/pypi\/Products.LDAPMultiPlugins\">LDAPMultiPlugins<\/a>, <a href=\"https:\/\/pypi.python.org\/pypi\/Products.LDAPUserFolder\">LDAPUserFolder<\/a>, and <a href=\"https:\/\/pypi.python.org\/pypi\/python-ldap\/\">python-ldap<\/a>. The versions used as of time of writing this guide are as follows:<\/p>\n<ul>\n<li>LDAPMultiPlugins 1.14<\/li>\n<li>LDAPUserFolder 2.24<\/li>\n<li>python-ldap 2.4.10<\/li>\n<\/ul>\n<p>Copy the downloaded tarballs to the Zenoss server.<\/p>\n<p>Next, install the prerequisite packages.<\/p>\n<pre># yum install gcc python-devel openssl-devel openldap-devel<\/pre>\n<p>Then, use <code>easy_install<\/code> to install the three packages you downloaded above. (<strong>Note<\/strong>: You must use the <code>easy_install<\/code> tool if you installed Zenoss using the autodeploy script.)<\/p>\n<pre># su - zenoss\r\nzenoss@zenprod:~$ su\r\nPassword:\r\n# cd ~\/build\r\n# easy_install Products.LDAPMultiPlugins-1.14.tar.gz\r\n...\r\n# easy_install Products.LDAPUserFolder-2.24.tar.gz\r\n...\r\n# easy_install python-ldap-2.4.10.tar.gz\r\n...<\/pre>\n<p>Restart Zope.<\/p>\n<pre>zenoss@zenprod:~$ zopectl restart<\/pre>\n<h3>Configure the LDAP Multi Plugin<\/h3>\n<ol>\n<li>Go to <a href=\"https:\/\/YOUR_ZENOSS_SERVER\/zport\/manage\">https:\/\/YOUR_ZENOSS_SERVER\/zport\/manage<\/a> and log in as <code>admin<\/code>.<\/li>\n<li>Click <code>acl_users<\/code> in the tree view on the left side of the page.<\/li>\n<li>Select <code>LDAP Multi Plugin<\/code> from the dropdown list and click <code>Add<\/code>.<\/li>\n<li>Configure the plugin. (Note: your configuration may vary depending on what you want to do, i.e. if you will be assigning roles based on LDAP groups or not.)<\/li>\n<\/ol>\n<p><strong>ID:<\/strong> &lt;enter an ID&gt;<br \/>\n<strong>Title:<\/strong> &lt;enter a title&gt;<br \/>\n<strong>LDAP Server:<\/strong> YOUR_LDAP_SERVER<br \/>\ncheck <strong>Use SSL<\/strong> if necessary<br \/>\ncheck <strong>Read-only<\/strong><br \/>\n<strong>Login Name Attribute, User ID Attribute, RDN Attribute:<\/strong> UID (uid)<br \/>\n<strong>Users Base DN:<\/strong> YOUR_BASE_DN<br \/>\nselect <strong>Groups not stored on LDAP server<\/strong><br \/>\n<strong>Groups Base DN:<\/strong> &lt;blank&gt;<br \/>\n<strong>Manager DN:<\/strong> &lt;blank&gt;<br \/>\n<strong>User password encryption:<\/strong> SHA<br \/>\n<strong>Default User Roles:<\/strong> &lt;blank&gt;<\/p>\n<ol start=\"5\">\n<li>Click <code>acl_users<\/code> then click the LDAP config you just created from the list.<\/li>\n<li>Check the boxes next to &#8220;Authentication&#8221;, &#8220;User_Enumeration&#8221;, and &#8220;Role_Enumeration&#8221;.<\/li>\n<\/ol>\n<p>At this point, you should be able to log in to Zenoss using credentials from LDAP.<\/p>\n<h3>Configure Authorization<\/h3>\n<p>To configure Zenoss role mappings from LDAP groups, please see this post: <a href=\"http:\/\/community.zenoss.org\/message\/30124#30124\">http:\/\/community.zenoss.org\/message\/30124#30124<\/a><\/p>\n<h2>Restricting Zenoss access to a subset of specific users<\/h2>\n<ol>\n<li>Go to <a href=\"https:\/\/YOUR_ZENOSS_SERVER\/zport\/manage\">https:\/\/YOUR_ZENOSS_SERVER\/zport\/manage<\/a> and log in as <code>admin<\/code>.<\/li>\n<li>Click <code>acl_users<\/code> in the tree view on the left side of the page.<\/li>\n<li>Click <code>roleManager<\/code>.<\/li>\n<li>Click <code>Add a Role<\/code> and enter &#8220;ZenNone&#8221; for the ID, then save.<\/li>\n<li>Click <code>acl_users<\/code> in the tree view on the left side of the page.<\/li>\n<li>Click your LDAP config.<\/li>\n<li>Select the <code>Contents<\/code> tab.<\/li>\n<li>Click <code>acl_users<\/code> in the list.<\/li>\n<li>Change <strong>Default User Roles<\/strong> to &#8220;ZenNone&#8221; and apply changes.<\/li>\n<li>Click <code>acl_users<\/code> in the tree view on the left side of the page.<\/li>\n<li>Click <code>roleManager<\/code>.<\/li>\n<li>Select the <code>Security<\/code> tab.<\/li>\n<li>Check all the checkboxes under Manager, Owner, and ZenManager. (<strong>IMPORTANT!<\/strong> If you do not do this step, you will lock your admin account out of the system!)<\/li>\n<li>Uncheck all the checkboxes under <strong>Acquire permission settings?<\/strong><\/li>\n<li>Check the checkboxes for &#8220;Access contents information&#8221; and &#8220;View&#8221; under <strong>ZenUser<\/strong>.<\/li>\n<li>Click <code>Save Changes<\/code>.<\/li>\n<\/ol>\n<p>When finished, users who are in LDAP are given restricted access (via the ZenNone role) by default, unless they have been granted a different Zenoss role. You can edit Zenoss role assignments via <code>Zope manager -&gt; acl_users -&gt; roleManager<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide contains instructions for enabling LDAP authentication in Zenoss Core 4.2+ on a relatively clean install of CentOS 6 (64-bit). Assumptions you are running CentOS 6 you have installed Zenoss Core 4.2+ using the autodeploy script Before You Begin It&#8217;s recommended that you backup your Zenoss configuration, either through a VM snapshot (if that&#8217;s&hellip; <a href=\"https:\/\/dev.blogs.oregonstate.edu\/sig\/2013\/03\/28\/enabling-ldap-authentication-in-zenoss-core-4-2-and-centos-6\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4820,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[626],"tags":[],"class_list":["post-103","post","type-post","status-publish","format-standard","hentry","category-monitoring"],"_links":{"self":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/users\/4820"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/comments?post=103"}],"version-history":[{"count":21,"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/posts\/103\/revisions"}],"predecessor-version":[{"id":124,"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/posts\/103\/revisions\/124"}],"wp:attachment":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/media?parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/categories?post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/sig\/wp-json\/wp\/v2\/tags?post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}