<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oleg Samoylov on Medium]]></title>
        <description><![CDATA[Stories by Oleg Samoylov on Medium]]></description>
        <link>https://medium.com/@pioneeru?source=rss-ea2b8b6b2093------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dYL2kPqhOceJvYav.jpg</url>
            <title>Stories by Oleg Samoylov on Medium</title>
            <link>https://medium.com/@pioneeru?source=rss-ea2b8b6b2093------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:49:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pioneeru/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Configure OpenLdap in NOI to support any corporate LDAP structure (Watson AIOps v3.1.1 and v3.2)]]></title>
            <link>https://medium.com/@pioneeru/configure-openldap-in-noi-to-support-any-corporate-ldap-structure-watson-aiops-v3-1-1-and-v3-2-229891b708d4?source=rss-ea2b8b6b2093------2</link>
            <guid isPermaLink="false">https://medium.com/p/229891b708d4</guid>
            <category><![CDATA[openldap]]></category>
            <category><![CDATA[ldap]]></category>
            <category><![CDATA[noi]]></category>
            <category><![CDATA[watson-aiops]]></category>
            <dc:creator><![CDATA[Oleg Samoylov]]></dc:creator>
            <pubDate>Wed, 09 Mar 2022 09:01:51 GMT</pubDate>
            <atom:updated>2022-03-09T09:01:51.445Z</atom:updated>
            <content:encoded><![CDATA[<p>There is a requirement for NOI v1.6.3 to have certain LDAP structure at the corporate LDAP server: <a href="https://www.ibm.com/docs/en/noi/1.6.3?topic=users-creating-external-ldap-server">Creating users on an external LDAP server</a>. Following the documentation we need to have groups in `ou=groups,LDAP_SUFFIX` and users in `ou=users,LDAP_SUFFIX` as well as have administrative users like “impactadmin” exactly named. Some companies not ready of the approach and request to have administrative users placed at another LDAP branch or even different LDAP domains and named with their style. Also, they’re not ready to change their domain structure because of inability to adjust security automations and policies for each application or solution they might currently use.</p><p>Here is how to configure OpenLadp that comes with cloud NOI to operate in “proxy” mode with corporate domain trees combined in a single virtual structure. Example in the article explains how to have administrative users in a local db of OpenLDAP container. The local db is defined by file <a href="https://github.com/pioneeru/openldap4waiops/blob/main/imageFiles/sso.ldif"><strong>sso.ldif</strong></a> which is inside container (all default passwords will be redefined automatically by NOI).</p><p>Link to GitHub repository: <a href="https://github.com/pioneeru/openldap4waiops">https://github.com/pioneeru/openldap4waiops</a></p><h3><strong>Solution Overview</strong></h3><p>In the example, we have a prototype of LDAP domain (MS AD) with the following structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*s8VP9keDNU2uR1mxWzr48g.png" /></figure><p>It is expected to grant access to NOI for users in ou=My Users,ou=Mon with spaces,dc=gofers1,dc=fyre,dc=ibm,dc=com branch, according to permissions assigned to their groups in ou=My Groups,ou=Mon with spaces,dc=gofers1,dc=fyre,dc=ibm,dc=com. We will use internal mdb database, which will hold the proxy domain dc=mycluster,dc=icp. The database is being populated during container startup from <a href="https://github.com/pioneeru/openldap4waiops/blob/main/imageFiles/sso.ldif"><strong>sso.ldif</strong></a> file. The database will contain limited number of administrative users required for internal NOI communication such as &quot;impactadmin&quot;. Below is the target scheme of the solution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*IyeEDP7e8dTA9wBZW98uug.png" /></figure><p>To have integration with corporate LDAP (Active Directory in our case) we will use several meta databases which will proxy AD branches. Main difference between ldap and meta databases is ability of meta to masquerade branch names and merge them into a structure required by NOI components. It is evident we can use as many meta databases as we need to glue AD branches into sub-branch of our domain dc=mycluster,dc=icp, for example, ou=ad1,ou=users,dc=mycluster,dc=icp and ou=ad2,ou=users,dc=mycluster,dc=icp. This way we can differentiate users between original sources. In our example we will use virtual organisational unit ou=ad.</p><p>By default, OpenLdap can be deployed in “proxy” or “standalone” mode, none of them has meta backend. The solution assumes usage of custom CentOSv7 image for OpenLDAP container. The installation instruction guides to use already prepared and published container at quay.io. However there are <a href="https://github.com/pioneeru/openldap4waiops/blob/main/Dockerfile_cap"><strong>Dockerfile_cap</strong></a> and <a href="https://github.com/pioneeru/openldap4waiops/blob/main/Dockerfile_nocap"><strong>Dockerfile_nocap</strong></a> which were used to create appropriate images. Difference between them in ability to use linux capabilities which were allowed in NOI of Watson AIOps 3.1 and deprecated in NOI of Watson AIOps 3.2. The files can be customised with your needs.</p><h3><strong>Installation</strong></h3><p>At the moment it is expected that Watson AIOps already installed and container version of NOI instance configured. During the instruction we expect working `oc` connected to the OpenShift cluster.</p><h4><strong>Step 1 — Configuring “proxy” mode for OpenLDAP</strong></h4><p>It is recommended to switch to “proxy” mode by editing yaml of NOI instance:</p><pre>oc edit NOI/evtmanager -n waiops</pre><p>where `eventmanager` is a name of NOI instance and `waiops` is a namespace where it is installed. The mode should be changed from “standalone” to “proxy” as below (only “mode” matters, other parameters can be left as they’re):</p><pre>...<br>  ldap:<br>    baseDN: dc=mycluster,dc=icp<br>    bindDN: cn=admin,dc=mycluster,dc=icp<br>    groupFilter: cn=%s,ou=groups<br>    <strong>mode: proxy</strong><br>    port: &quot;389&quot;<br>    serverType: CUSTOM<br>    sslPort: &quot;636&quot;<br>    storageClass: &quot;&quot;<br>    storageSize: 1Gi<br>    suffix: dc=mycluster,dc=icp<br>    url: ldap://localhost:389<br>    userFilter: uid=%s,ou=users<br>...</pre><p>this change will trigger openldap stetefulset to recreate and pod to restart with new configuration. After the configuration you might find openldap pod in non-working state because of configuration is not finished.</p><h4>Step 2 — Configuring OpenLDAP</h4><p>The main configuration file is <a href="https://github.com/pioneeru/openldap4waiops/blob/main/openldap/ldap-proxy-slapd-replace"><strong>openldap/ldap-proxy-slapd-replace</strong></a> which will be used to start OpenLDAP application. We need to adjust the file according to corporate directory credentials. It is predefined to connect to AD from our example.</p><ul><li>Navigate to the meta database definition section for <strong>“users”</strong>:</li></ul><pre>...<br>####################################################################<br># META Databases Definitions<br>####################################################################<br><br>database        meta<br><strong>suffix &quot;ou=ad,ou=users,dc=mycluster,dc=icp&quot;</strong><br>rootdn &quot;cn=admin,dc=mycluster,dc=icp&quot;<br>overlay memberof<br>subordinate<br><br><strong>uri ldap://9.30.45.43/ou=ad,ou=users,dc=mycluster,dc=icp</strong><br>readonly      yes<br>lastmod       off<br><strong>suffixmassage  &quot;ou=ad,ou=users,dc=mycluster,dc=icp&quot; &quot;ou=My Users,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot;</strong><br>chase-referrals yes<br>rebind-as-user no<br>idassert-bind bindmethod=simple<br>   <strong>binddn=&quot;cn=netcool3,ou=MyUsers,ou=Mon,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot;</strong><br>   <strong>credentials=&quot;This_is_my_pass1&quot;</strong><br>   mode=none<br>   flags=non-prescriptive<br>idassert-authzFrom &quot;dn.exact:cn=admin,dc=mycluster,dc=icp&quot;<br><br>overlay  rwm<br><strong>rwm-suffixmassage  &quot;ou=ad,ou=groups,dc=mycluster,dc=icp&quot; &quot;ou=My Groups,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot;</strong><br>rwm-map  attribute uid sAMAccountname<br>rwm-map  attribute memberOf memberOf<br>rwm-map  attribute member member<br>rwm-map  objectclass groupOfNames GROUP<br>...</pre><ul><li>Update DB naming context on line suffix &quot;ou=ad,ou=users,dc=mycluster,dc=icp&quot; with required organization unit, in our example: ou=ad.</li><li>Update line uri ldap://9.30.45.43/ou=ad,ou=users,dc=mycluster,dc=icp where:</li></ul><blockquote><strong>9.30.45.43</strong> — IP address of external LDAP directory for which we will proxy requests for users</blockquote><blockquote><strong>ou=ad,ou=users,dc=mycluster,dc=icp</strong> — Naming context should be within the naming context of DB</blockquote><ul><li>Update suffixmassage &quot;ou=ad,ou=users,dc=mycluster,dc=icp&quot; &quot;ou=My Users,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot; record:</li></ul><blockquote><strong>ou=ad,ou=users,dc=mycluster,dc=icp</strong> — Virtual naming context for NOI.</blockquote><blockquote><strong>ou=My Users,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com </strong>— Real naming context which contans real users for rewrite engine.</blockquote><ul><li>Update bind DN on line binddn=&quot;cn=netcool3,ou=MyUsers,ou=Mon,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot;, specifying username to access external LDAP.</li><li>Update credentials for bind DN credentials=&quot;This_is_my_pass1&quot; to access external LDAP.</li><li>Some attributes like “memberOf” will contain group names from out of the users context, so we need to rewite them as well. Update rwm-suffixmassage &quot;ou=ad,ou=groups,dc=mycluster,dc=icp&quot; &quot;ou=My Groups,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot; line with correct values for mapping:</li></ul><blockquote><strong>ou=ad,ou=groups,dc=mycluster,dc=icp</strong> — Virtual naming context for groups in NOI. ou=My Groups,ou=Mon with</blockquote><blockquote><strong>space,DC=gofers1,DC=fyre,DC=ibm,DC=com</strong> — Real naming context which contains original groups for rewrite engine.</blockquote><ul><li>Navigate to the meta database definition section for <strong>“groups”</strong>:</li></ul><pre>...<br>database        meta<br><strong>suffix &quot;ou=ad,ou=groups,dc=mycluster,dc=icp&quot;</strong><br>rootdn &quot;cn=admin,dc=mycluster,dc=icp&quot;<br>overlay memberof<br>subordinate<br><br><strong>uri ldap://9.30.45.43/ou=ad,ou=groups,dc=mycluster,dc=icp</strong><br>readonly      yes<br>lastmod       off<br><strong>suffixmassage  &quot;ou=ad,ou=groups,dc=mycluster,dc=icp&quot; &quot;ou=My Groups,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot;</strong><br>chase-referrals yes<br>idassert-bind bindmethod=simple<br>   <strong>binddn=&quot;cn=netcool3,ou=MyUsers,ou=Mon,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot;</strong><br>   <strong>credentials=&quot;This_is_my_pass1&quot;</strong><br>   mode=self<br>   flags=non-prescriptive<br>idassert-authzFrom &quot;dn.exact:cn=admin,dc=mycluster,dc=icp&quot;<br><br>overlay  rwm<br><strong>rwm-suffixmassage  &quot;ou=ad,ou=users,dc=mycluster,dc=icp&quot; &quot;ou=My Users,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot;</strong><br>rwm-map  attribute uid sAMAccountname<br>rwm-map  attribute memberOf memberOf<br>rwm-map  attribute member member<br>rwm-map  objectclass groupOfNames GROUP<br><br>####################################################################<br># MDB database definitions<br>####################################################################<br>...</pre><ul><li>Update DB naming context on line suffix &quot;ou=ad,ou=groups,dc=mycluster,dc=icp&quot; with required organization unit, in our example: ou=ad.</li><li>Update line uri ldap://9.30.45.43/ou=ad,ou=groups,dc=mycluster,dc=icp where:</li></ul><blockquote><strong>9.30.45.43</strong> — IP address of external LDAP directory for which we will proxy requests for groups</blockquote><blockquote><strong>ou=ad,ou=groups,dc=mycluster,dc=icp</strong> — Naming context should be within the naming context of DB</blockquote><ul><li>Update suffixmassage &quot;ou=ad,ou=groups,dc=mycluster,dc=icp&quot; &quot;ou=My Groups,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot; record:</li></ul><blockquote><strong>ou=ad,ou=groups,dc=mycluster,dc=icp</strong> — Virtual naming context for NOI.</blockquote><blockquote><strong>ou=My Groups,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com</strong> — Real naming context which contans original groups for rewrite engine.</blockquote><ul><li>Update bind DN on line binddn=&quot;cn=netcool3,ou=MyUsers,ou=Mon,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot;, specifying username to access external LDAP.</li><li>Update credentials for bind DN credentials=&quot;This_is_my_pass1&quot; to access external LDAP.</li><li>Attributes like “members” will contain user names from out of the group context, so we need to map them correctly. Update rwm-suffixmassage &quot;ou=ad,ou=users,dc=mycluster,dc=icp&quot; &quot;ou=My Users,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com&quot; line with correct values for mapping:</li></ul><blockquote><strong>ou=ad,ou=users,dc=mycluster,dc=icp</strong> — Virtual naming context for users in NOI.</blockquote><blockquote><strong>ou=My Users,ou=Mon with space,DC=gofers1,DC=fyre,DC=ibm,DC=com</strong> — Real naming context which contains original users for rewrite engine when processing group records.</blockquote><p>For more information on configuring slapd.conf rever to the <a href="https://www.openldap.org/software/man.cgi?query=slapd.conf">Manual page for slapd.conf</a>.</p><h4>Step 3 — Apply changes</h4><ul><li>Review head of the script apply_openldap_changes.sh:</li></ul><pre>#!/usr/local/bin/bash</pre><pre>NAMESPACE=&quot;waiops&quot;                # Namespace where NOI installed<br>NOI_INSTANCE_NAME=&quot;evtmanager&quot;    # NOI instance name<br>...</pre><p>Adjust path for bash, NOI namespace and NOI instance name.</p><ul><li>Run apply_openldap_changes.sh:</li></ul><pre>[oleg@api OCP_NOI_OpenLdap]$ <strong>./apply_openldap_changes.sh</strong> <br>configmap/evtmanager-ldap-proxy-config configured<br>Linux capabilities granted...<br>statefulset.apps/evtmanager-openldap scaled<br>statefulset.apps/evtmanager-openldap patched<br>statefulset.apps/evtmanager-openldap scaled<br>statefulset.apps/evtmanager-webgui scaled<br>statefulset.apps/evtmanager-webgui scaled<br>statefulset.apps/evtmanager-nciserver scaled<br>statefulset.apps/evtmanager-nciserver scaled<br>statefulset.apps/evtmanager-impactgui scaled<br>statefulset.apps/evtmanager-impactgui scaled<br>[oleg@api OCP_NOI_OpenLdap]$</pre><h4>Step 4 — Check results</h4><p>After executing the script wait for the following pods to start. You can check status with the following command:</p><pre>[oleg@api OCP_NOI_OpenLdap]$ <strong>oc get pods | grep -E &#39;openldap|webgui|nciserver|impactgui&#39;</strong><br>evtmanager-impactgui-0            2/2     Running    0          12m<br>evtmanager-nciserver-0            2/2     Running    0          12m<br>evtmanager-openldap-0             1/1     Running    0          12m<br>evtmanager-webgui-0               2/2     Running    0          12m<br>[oleg@api OCP_NOI_OpenLdap]$</pre><ul><li>Open NOI web-interface, navigate to “Netcool WebGUI” -&gt; “Console settings” -&gt; “Group Roles” (or “User Roles”) and ensure “Unique Name” includes groups from Active Directory:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tppV62TtQAfqLosabd001A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=229891b708d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>