<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Idem</title>
	<atom:link href="https://idemblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://idemblog.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 25 Feb 2021 01:06:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<site xmlns="com-wordpress:feed-additions:1">110819042</site><cloud domain='idemblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://s2.wp.com/i/webclip.png</url>
		<title>Idem</title>
		<link>https://idemblog.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://idemblog.wordpress.com/osd.xml" title="Idem" />
	<atom:link rel='hub' href='https://idemblog.wordpress.com/?pushpress=hub'/>
	<item>
		<title>OpenLDAP Access Control</title>
		<link>https://idemblog.wordpress.com/2021/02/23/openldap-access-control/</link>
					<comments>https://idemblog.wordpress.com/2021/02/23/openldap-access-control/#respond</comments>
		
		<dc:creator><![CDATA[SteveG in North Van]]></dc:creator>
		<pubDate>Tue, 23 Feb 2021 01:12:40 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[openldap]]></category>
		<guid isPermaLink="false">http://idemblog.wordpress.com/?p=29</guid>

					<description><![CDATA[Determining the current Access Control Rules I had some fun trying to figure out Access Control using the osixia/docker-openldap docker image. The image uses the dynamic configuration model rather than the slapd.conf file. This is a more flexible way of changing config without having to restart the server. The configuration is stored in the cn=config &#8230; <a href="https://idemblog.wordpress.com/2021/02/23/openldap-access-control/" class="more-link">Continue reading <span class="screen-reader-text">OpenLDAP Access Control</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Determining the current Access Control Rules</h2>



<p class="wp-block-paragraph">I had some fun trying to figure out Access Control using the <a href="https://github.com/osixia/docker-openldap" target="_blank" rel="noreferrer noopener">osixia/docker-openldap</a> docker image.  The image uses the dynamic configuration model rather than the slapd.conf file.  This is a more flexible way of changing config without having to restart the server.  The configuration is stored in the cn=config dn. It is edited using ldapmodify or ldapadd.  </p>



<p class="wp-block-paragraph">The problem I had was that I couldn&#8217;t find the dn cn=config.  It didn&#8217;t show up in ldapsearch or using <a rel="noreferrer noopener" href="https://directory.apache.org/studio/" target="_blank">Apache Directory Studio</a>. After searching around on Google, I eventually found the article <a rel="noreferrer noopener" href="https://unix.stackexchange.com/questions/11549/howto-set-access-control-lists-acls-in-openldap" target="_blank">Howto set access control lists ACLs in OpenLDAP</a> on the Unix and Linux Stack Exchange.  This article was very helpful in showing how to access the ACL permissions in OpenLDAP.</p>



<p class="wp-block-paragraph">What I didn&#8217;t understand was that I needed to use the ldapi protocol and the EXTERNAL SASL authentication to access the configuration DN.  This can only be done on the server itself.  </p>



<p class="wp-block-paragraph">Since this is a Docker image, I needed to open a shell on the running container to access the configuration.</p>



<pre class="wp-block-code"><code>docker exec -it ldap-server_openldap_1 /bin/bash</code></pre>



<p class="wp-block-paragraph">This provides access to a shell in the docker container itself. From there, I needed to run <code>ldapsearch</code> specifying the SASL External protocol and the appropriate search dn.</p>



<pre class="wp-block-code"><code>ldapsearch -Y external -H ldapi:/// -b cn=config -o ldif-wrap=no 'olcDatabase={1}mdb' olcAccess</code></pre>



<p class="wp-block-paragraph">The parameter <code>-Y external</code> specifies using the external SASL protocol.  This uses Unix-domain sockets to authenticate using the UID and GID of the client process.  See Section <a rel="noreferrer noopener" href="https://www.openldap.org/doc/admin24/sasl.html" target="_blank">15.2.4. EXTERNAL</a> in the OpenLDAP Administrators Guide for more information.</p>



<p class="wp-block-paragraph">The parameter <code>-H ldapi:///</code> specifies using the LDAP over IPC protocol starting at the root of the LDAP structure.</p>



<p class="wp-block-paragraph">The parameter <code>-b cn=config</code> specifies the starting point for search.</p>



<p class="wp-block-paragraph">The parameter <code>-o ldif-wrap=no</code> causes ldapsearch to not try to wrap text.  I find wrapped text to be very annoying.</p>



<p class="wp-block-paragraph">The <code>'olcDatabase={1}mdb'</code> parameter specifies a filter that constrains the output to just entries where the olcDatabase attribute has the value {1}mdb.  The mdb portion of this attribute value indicates the database format, so it could be hdb if the backend database is Berkley DB.  See <a rel="noreferrer noopener" href="https://www.openldap.org/doc/admin24/backends.html" target="_blank">Section 11.1. Berkeley DB Backends</a> in the OpenLDAP Administrator&#8217;s Guide.</p>



<p class="wp-block-paragraph">Finally, the <code>olcAccess</code> parameter specifies that only the olcAccess attribute should be returned.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://idemblog.wordpress.com/2021/02/23/openldap-access-control/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">29</post-id>
		<media:thumbnail url="https://idemblog.wordpress.com/wp-content/uploads/2021/02/pexels-eric-anada-1495580.jpg" />
		<media:content url="https://idemblog.wordpress.com/wp-content/uploads/2021/02/pexels-eric-anada-1495580.jpg" medium="image">
			<media:title type="html">pexels-eric-anada-1495580</media:title>
		</media:content>

		<media:content url="https://0.gravatar.com/avatar/0428856fcf8c8d73f4d037781662e143864300251f49fdc7e75d691e843ebb6d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">steveg0493</media:title>
		</media:content>
	</item>
		<item>
		<title>Building an LDAP Server with Docker</title>
		<link>https://idemblog.wordpress.com/2021/02/22/building-an-ldap-server-with-docker/</link>
					<comments>https://idemblog.wordpress.com/2021/02/22/building-an-ldap-server-with-docker/#respond</comments>
		
		<dc:creator><![CDATA[SteveG in North Van]]></dc:creator>
		<pubDate>Mon, 22 Feb 2021 22:59:22 +0000</pubDate>
				<category><![CDATA[ldap]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[openldap]]></category>
		<guid isPermaLink="false">http://idemblog.wordpress.com/?p=20</guid>

					<description><![CDATA[To start exploring identity management, I need to have an identity store to start with. I have been exploring the capabilities of Docker and so I want to experiment with standing up a light-weight LDAP server using Docker as the platform. I chose to use the osixia/docker-openldap docker image. This stands up a basic Open &#8230; <a href="https://idemblog.wordpress.com/2021/02/22/building-an-ldap-server-with-docker/" class="more-link">Continue reading <span class="screen-reader-text">Building an LDAP Server with&#160;Docker</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">To start exploring identity management, I need to have an identity store to start with.  I have been exploring the capabilities of Docker and so I want to experiment with standing up a light-weight LDAP server using Docker as the platform.</p>



<p class="wp-block-paragraph">I chose to use the <a href="https://github.com/osixia/docker-openldap">osixia/docker-openldap</a> docker image.  This stands up a basic Open LDAP service with only the admin user defined.  The root dn is sdgallagher.ca based on my personal domain.</p>



<p class="wp-block-paragraph">The source code for this is <a rel="noreferrer noopener" href="https://github.com/steveg0493/docker-ldap" target="_blank">steveg0493/docker-ldap</a>.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://idemblog.wordpress.com/2021/02/22/building-an-ldap-server-with-docker/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">20</post-id>
		<media:thumbnail url="https://idemblog.wordpress.com/wp-content/uploads/2021/02/pexels-eric-anada-1495580.jpg" />
		<media:content url="https://idemblog.wordpress.com/wp-content/uploads/2021/02/pexels-eric-anada-1495580.jpg" medium="image">
			<media:title type="html">pexels-eric-anada-1495580</media:title>
		</media:content>

		<media:content url="https://0.gravatar.com/avatar/0428856fcf8c8d73f4d037781662e143864300251f49fdc7e75d691e843ebb6d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">steveg0493</media:title>
		</media:content>
	</item>
	</channel>
</rss>
