<?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> &#187; IdM</title>
	<atom:link href="http://blog.profiq.cz/tag/IdM/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.profiq.cz</link>
	<description></description>
	<lastBuildDate>Thu, 09 May 2013 20:09:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.profiq.cz' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/8edd40d560ec01659641a3073c59644d?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title> &#187; IdM</title>
		<link>http://blog.profiq.cz</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.profiq.cz/osd.xml" title="" />
	<atom:link rel='hub' href='http://blog.profiq.cz/?pushpress=hub'/>
		<item>
		<title>OpenIDM: Using MS SQL as internal repository</title>
		<link>http://blog.profiq.cz/2013/02/07/openidm-using-ms-sql-as-internal-repository/</link>
		<comments>http://blog.profiq.cz/2013/02/07/openidm-using-ms-sql-as-internal-repository/#comments</comments>
		<pubDate>Thu, 07 Feb 2013 13:52:10 +0000</pubDate>
		<dc:creator>lfolta</dc:creator>
				<category><![CDATA[Integration]]></category>
		<category><![CDATA[ForgeRock]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[internal repository]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[OpenIDM]]></category>

		<guid isPermaLink="false">http://blog.profiq.cz/?p=2867</guid>
		<description><![CDATA[As of the newest builds of OpenIDM 2.1.0 Xpress, among the others, a capability to use a MS SQL as internal repository has been added. Following lines will describe how you can set up Microsoft&#8217;s SQL database as OpenIDM&#8217;s internal repository. Step one: Prepare your MS SQL server Download and install MS SQL Server. For [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=2867&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>As of the newest builds of OpenIDM 2.1.0 Xpress, among the others, a capability to use a MS SQL as internal repository has been added. Following lines will describe how you can set up Microsoft&#8217;s SQL database as OpenIDM&#8217;s internal repository.</p>
<p><span id="more-2867"></span><br />
Step one:</p>
<h3>Prepare your MS SQL server</h3>
<p style="text-align:left;">Download and install MS SQL Server. For this article <a title="MS SQL 2008 EXPRESS" href="http://www.microsoft.com/en-us/download/details.aspx?id=1842" target="_blank">MS SQL 2008 R2 EXPRESS</a> has been used. As of today, there is only MS SQL Server 2008 R2 officialy supported. However, it <strong>SHOULD</strong> work with all MS SQL Servers since MS SQL Server 2008.</p>
<p>During the installation you will be prompted if you want to use Windows authentication only or you want to allow also SQL authentication. In order to use MS SQL as OpenIDM&#8217;s repository, you have to allow SQL authentication as well.<a href="http://blogprofiq.files.wordpress.com/2012/12/mssql2.png" target="_blank" rel="attachment wp-att-2870"><img class="size-full wp-image-2870 aligncenter" alt="MSSQL2" src="http://blogprofiq.files.wordpress.com/2012/12/mssql2.png?w=600&#038;h=449" width="600" height="449" /></a></p>
<p><a href="http://blogprofiq.files.wordpress.com/2012/12/mssql1.png" target="_blank" rel="attachment wp-att-2869"><img class="size-full wp-image-2869 aligncenter" alt="MSSQL1" src="http://blogprofiq.files.wordpress.com/2012/12/mssql1.png?w=600&#038;h=449" width="600" height="449" /></a></p>
<p>Once the installation is finished, run the SQL Server Configuration Manager. Open SQL Server Network Configuration, click on Protocols for SQLEXPRESS, enable TCP/IP. When the TCP/IP is enabled double-click on TCP/IP, tab IP Addresses. There you can setup to which IP addresses and ports will the server listen. For this article, we will use the very last one &#8211; IPAll. Set the TCP Dynamic port to 1433 (The 1433 is default port for MS SQL.). And also don&#8217;t forget to adjust your firewall settings.</p>
<p><a href="http://blogprofiq.files.wordpress.com/2013/01/mssql3.png" target="_blank"><img class="size-full wp-image-2937 aligncenter" alt="MSSQL3" src="http://blogprofiq.files.wordpress.com/2013/01/mssql3.png?w=600&#038;h=339" width="600" height="339" /></a></p>
<p>To apply new configuration the SQL Server has to be restarted. This can be done in SQL Server Services.</p>
<p><a href="http://blogprofiq.files.wordpress.com/2013/01/mssql5.png" target="_blank"><img class="size-full wp-image-2938 aligncenter" alt="MSSQL5" src="http://blogprofiq.files.wordpress.com/2013/01/mssql5.png?w=600&#038;h=188" width="600" height="188" /></a></p>
<p>As a next step, run Microsoft SQL Server Management Studio (SSMS) (Comes with MS SQL Server. If not, download it from <a title="Microsoft's web pages" href="http://www.microsoft.com/en-us/download/default.aspx">Microsoft&#8217;s web pages</a>.) and login as a current user (e.g. Administrator).</p>
<p>Then open OpenIDM&#8217;s database definition SQL script from <strong>openidm/db/scripts/mssql/openidm.sql</strong> (File -&gt; Open -&gt; file or use shortcut ctrl + O) and execute it. The script will create a new database openidm and two new users &#8211; openidm and openidm_proxy.<br />
The default password for both users is &#8216;Passw0rd&#8217;.</p>
<p>And that is it. The MS SQL Server is ready.</p>
<p>Step two:</p>
<h3>Configure OpenIDM to use MS SQL Server as repository</h3>
<p>There are few steps that need to be followed configure it &#8211; in short: you need to add jdbc driver to bundles and switch the repo.json files. So, let&#8217;s describe it in more detail.</p>
<p>Following steps to create jdbc driver jar file can also be found in openidm/db/scripts/mssql/sqljdbc4.bnd:</p>
<ul>
<li>Download <strong>sqljdbc_4.0.2206.100_enu.tar.gz</strong> from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=11774" target="_blank">http://www.microsoft.com/en-us/download/details.aspx?id=11774</a> and extract sqljdbc4.jar from it.</li>
<li>Then download <strong>biz.aQute.bnd.jar</strong> from <a href="http://dl.dropbox.com/u/2590603/bnd/biz.aQute.bnd.jar" rel="nofollow">http://dl.dropbox.com/u/2590603/bnd/biz.aQute.bnd.jar</a>.</li>
<li>Put both files to <strong>openidm/db/scripts/mssql/</strong> folder and run following command from command line
<pre>java -jar biz.aQute.bnd.jar wrap -properties sqljdbc4.bnd sqljdbc4.jar</pre>
</li>
<li>as result a <strong>sqljdbc4.bar</strong> should be generated. Rename it to <strong>sqljdbc4-osgi.jar</strong> and copy it to <strong>openidm/bundle</strong>.</li>
</ul>
<p>One last thing is remaining and the setup is complete.</p>
<p>As of a day of writing this blog, there are only three kinds of resources supported as OpenIDM&#8217;s repository; namely OrientDB, MySQL and MS SQL. The repository configuration file for OrientDB is called <strong>repo.orientdb.json</strong> and for MS SQL and MySQL  is a common name &#8211; <strong>repo.jdbc.json</strong>. So, go to <strong>openidm/samples/misc</strong> and locate <strong>repo.jdbc-mssql.json</strong> which is pre-configured configuration file for MS SQL and copy it to <strong>openidm/conf</strong> directory.</p>
<p>Once the file is copied, rename it to <strong>repo.jdbc.json</strong>. However, the OpenIDM requires only one repository configuration file to be present in conf directory, so the other one has to be either deleted (in case of <strong>repo.orientdb.json</strong>) or overwritten (in case of <strong>repo.jdbc.json</strong>). If you are using another user to access the repository than the user created by SQL defenition script (user openidm), you need to change the credentials in <strong>repo.jdbc.json</strong>.</p>
<p>Now the configuration is complete and you can start OpenIDM and check if the MS SQL repo is working.</p>
<br />Filed under: <a href='http://blog.profiq.cz/category/integration/'>Integration</a> Tagged: <a href='http://blog.profiq.cz/tag/forgerock/'>ForgeRock</a>, <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/internal-repository/'>internal repository</a>, <a href='http://blog.profiq.cz/tag/mssql/'>MSSQL</a>, <a href='http://blog.profiq.cz/tag/openidm/'>OpenIDM</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/2867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/2867/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=2867&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2013/02/07/openidm-using-ms-sql-as-internal-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8da4dcc7f1c249f88ee383dd5c10b52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lfolta</media:title>
		</media:content>

		<media:content url="http://blogprofiq.files.wordpress.com/2012/12/mssql2.png" medium="image">
			<media:title type="html">MSSQL2</media:title>
		</media:content>

		<media:content url="http://blogprofiq.files.wordpress.com/2012/12/mssql1.png" medium="image">
			<media:title type="html">MSSQL1</media:title>
		</media:content>

		<media:content url="http://blogprofiq.files.wordpress.com/2013/01/mssql3.png" medium="image">
			<media:title type="html">MSSQL3</media:title>
		</media:content>

		<media:content url="http://blogprofiq.files.wordpress.com/2013/01/mssql5.png" medium="image">
			<media:title type="html">MSSQL5</media:title>
		</media:content>
	</item>
		<item>
		<title>Partnering with ForgeRock to deliver Open Identity and Access Management Solutions</title>
		<link>http://blog.profiq.cz/2013/01/16/partnering-with-forgerock-to-deliver-open-identity-and-access-management-solutions/</link>
		<comments>http://blog.profiq.cz/2013/01/16/partnering-with-forgerock-to-deliver-open-identity-and-access-management-solutions/#comments</comments>
		<pubDate>Wed, 16 Jan 2013 16:02:02 +0000</pubDate>
		<dc:creator>Gabor Puhalla</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[DSEE]]></category>
		<category><![CDATA[ForgeRock]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[OpenAM]]></category>
		<category><![CDATA[OpenDJ]]></category>
		<category><![CDATA[OpenDS]]></category>
		<category><![CDATA[OpenIDM]]></category>
		<category><![CDATA[profiq]]></category>
		<category><![CDATA[SSO]]></category>
		<category><![CDATA[Sun Microsystems]]></category>
		<category><![CDATA[system engineering]]></category>

		<guid isPermaLink="false">http://blog.profiq.cz/?p=2876</guid>
		<description><![CDATA[profiq just announeced strategic partnership with ForgeRock for system integration of open-source and standard-based Access and Identity Management (IAM) products. This is a fundamental milestone in fulfilling profiq&#8217;s system integration and system testing strategy. We have spent the last 8+ years with deploying and testing ForgeRock products and their predecessors and looking forward to offering [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=2876&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><em>profiq just announeced strategic partnership with <a title="ForgeRock" href="http://www.forgerock.com" target="_blank">ForgeRock</a> for system integration of open-source and standard-based Access and Identity Management (IAM) products. This is a fundamental milestone in fulfilling profiq&#8217;s system integration and system testing strategy. We have spent the last 8+ years with deploying and testing ForgeRock products and their predecessors and looking forward to offering an extended service to customers in the Czech Republic, Slovakia and Hungary with ForgeRock.</em></p>
<p><span id="more-2876"></span></p>
<p>Our strartegic objective is to provide customers with the freedom and flexibility they need in deploying and using IAM products in enterprise, mobile, cloud and social environments, while avoiding vendor lock-in to cumbersome, proprietary vendor solutions. The ForgeRock <a href="http://forgerock.com/sun-replacement/" target="_blank">Open Identity Stack</a> is the key to enabling just that.</p>
<p>Our first priority is to help customers of former Sun AIM products. The support of Sun OpenSSO (Oracle OpenSSO), Sun Identity Manger (Oracle Waveset) and Sun OpenDS is going to end soon. ForgeRock&#8217;s <a href="http://forgerock.com/sun-replacement/" target="_blank">Open Identity Stack </a>is a world-wide supported continuation of Sun’s former AIM stack and provides an easy way forward without major disruptions to business. Should you operate any of</p>
<ul>
<li>Sun Directory Server, Sun OpenDS</li>
<li>Sun Access Manager, Sun OpenSSO</li>
<li>Sun Identity Manager</li>
</ul>
<p>currently and searching for a way forward, <a title="Contacts" href="http://www.profiq.cz/staging1/new/integration/about/contacts.php" target="_blank">contacts us</a>! We have a smooth upgrade approach for you, both technology and business wise.</p>
<p>See the press release at <a href="http://integration.profiq.cz/about/press.php">http://integration.profiq.cz/about/press.php</a> and a more detailed explanation of our services at <a href="http://integration.profiq.cz/services/">http://integration.profiq.cz/services/</a></p>
<br />Filed under: <a href='http://blog.profiq.cz/category/general/'>General</a>, <a href='http://blog.profiq.cz/category/integration/'>Integration</a> Tagged: <a href='http://blog.profiq.cz/tag/dsee/'>DSEE</a>, <a href='http://blog.profiq.cz/tag/forgerock/'>ForgeRock</a>, <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/ldap/'>LDAP</a>, <a href='http://blog.profiq.cz/tag/openam/'>OpenAM</a>, <a href='http://blog.profiq.cz/tag/opendj/'>OpenDJ</a>, <a href='http://blog.profiq.cz/tag/opends/'>OpenDS</a>, <a href='http://blog.profiq.cz/tag/openidm/'>OpenIDM</a>, <a href='http://blog.profiq.cz/tag/profiq/'>profiq</a>, <a href='http://blog.profiq.cz/tag/sso/'>SSO</a>, <a href='http://blog.profiq.cz/tag/sun-microsystems/'>Sun Microsystems</a>, <a href='http://blog.profiq.cz/tag/system-engineering/'>system engineering</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/2876/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/2876/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=2876&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2013/01/16/partnering-with-forgerock-to-deliver-open-identity-and-access-management-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3a197370d3f13b8eaebb4f2b79b678f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gaborpuhalla</media:title>
		</media:content>
	</item>
		<item>
		<title>Connecting OpenIdM with Microsoft Active Directory &#8211; How to set it up!</title>
		<link>http://blog.profiq.cz/2012/11/14/connecting-openidm-with-microsoft-active-directory-how-to-set-it-up/</link>
		<comments>http://blog.profiq.cz/2012/11/14/connecting-openidm-with-microsoft-active-directory-how-to-set-it-up/#comments</comments>
		<pubDate>Wed, 14 Nov 2012 13:49:01 +0000</pubDate>
		<dc:creator>lfolta</dc:creator>
				<category><![CDATA[Integration]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[ForgeRock]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[OpenICF]]></category>
		<category><![CDATA[OpenIDM]]></category>

		<guid isPermaLink="false">http://blog.profiq.cz/?p=2767</guid>
		<description><![CDATA[This article is about setting up ForgeRock&#8217;s Open Identity Management with Microsoft Active Directory using standalone .NET Connector Server. About OpenIDM &#38; OpenICF OpenIDM communicates with various kinds of resources from simple files (XML, CSV) to more complex ones, like various LDAP implementations and SQL databases. This communication is provided via Open Identity Connector Framework [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=2767&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:left;">This article is about setting up <a href="http://openidm.forgerock.org/" target="_blank">ForgeRock&#8217;s Open Identity Management</a> with Microsoft Active Directory using standalone .NET Connector Server.</p>
<p><span id="more-2767"></span></p>
<h4>About OpenIDM &amp; OpenICF</h4>
<p>OpenIDM communicates with various kinds of resources from simple files (XML, CSV) to more complex ones, like various LDAP implementations and SQL databases. This communication is provided via <a href="http://openicf.forgerock.org/" target="_blank">Open Identity Connector Framework and Toolkit</a> (OpenICF). If, for some reason, access libraries cannot be build-in to OpenIDM (cannot be included inside Java Virtual Machine) an external connector server is needed. This article covers deployment of OpenIDM on one machine and external .NET Connector Server where remote connector is implemented on second remote machine. In this deployment .Net Connector Server provides a way to connect OpenIDM with Microsoft Active Directory as depicted in below diagram:<a href="http://blogprofiq.files.wordpress.com/2012/11/dotnetconnectorschema1.jpg"><img class="wp-image-2816 aligncenter" title="DotNetConnectorSchema" alt="" src="http://blogprofiq.files.wordpress.com/2012/11/dotnetconnectorschema1.jpg?w=600&#038;h=154" height="154" width="600" /></a></p>
<h4>Prerequisites</h4>
<ul>
<li>Windows 2003 or 2008</li>
<li>.NET Framework 4.0</li>
<li>Microsoft Active Directory &#8211; In this setup I used the AD bundled with Windows 2008 RC2 SP1</li>
<li>OpenIDM 2.1.0. revision 1395</li>
</ul>
<h4>Installing .NET Connector Server on Windows</h4>
<ol>
<li>Download connector server from <a href="http://builds.forgerock.org/job/OpenICF%20-%20Framework%20(dotnet)/" target="_blank">here</a> (tested on build #23 )</li>
<li>Execute the downloaded .msi file. Just follow the wizard. It will walk you through the whole process step by step. Upon completion, the Connector Server will be installed as a windows service called “Connector Server”.</li>
</ol>
<h4>Starting and Stopping the Connector Server</h4>
<ol>
<li>You can start or stop the server using Microsoft Services Console. Start -&gt; type Services -&gt; Services</li>
<li>Also you can start the server from command prompt. Start -&gt; type cmd -&gt; cmd. Change the directory to where the Connector Server has been installed, by default\Program Files\Identity Connectors\Connector Server
<pre>C:\&gt; cd “Program Files (x86)\Identity Connectors\Connector Server”</pre>
<p>and run the following command:</p>
<pre>./ConnetorServer.exe /run</pre>
</li>
</ol>
<h4>Configuring the .NET Connector Server</h4>
<ol>
<li style="text-align:left;">Start the Microsoft Services Console (Start -&gt; type Services -&gt; Services ). Check to see if the Connector Server is currently running. If so, stop it. From a command prompt (Start -&gt; type cmd), set the key for the connector Server. This is done by changing to the directory where the connector server was installed and executing the following command:
<pre>./ConnectorServer.exe /setkey &lt;newkey&gt;</pre>
<p>where</p>
<pre>&lt;newkey&gt;</pre>
<p>is the string value. This key is required by any client that connects to this Connector Server.</li>
<li>See the <strong>ConnectorServer.exe.config</strong> for addtional configuration. The port, address, and SSL settings are in the tag called <strong>AppSettings</strong>, and look like this:
<pre>&lt;add key="connectorserver.port" value="8759" /&gt;
&lt;add key="connectorserver.usessl" value="false" /&gt;
&lt;add key="connectorserver.certificatestorename"
              value="ConnectorServerSSLCertificate" /&gt;
&lt;add key="connectorserver.ifaddress" value="0.0.0.0" /&gt;</pre>
<ul>
<li>connectorserver.port &#8211; Sets the port</li>
<li>connectorserver.ifaddress &#8211; Accepting connections from particular address or all (0.0.0.0)</li>
<li>connectorserver.usessl &#8211; Turns on/off the SSL</li>
<li>connectorserver.certifacatestorename &#8211; If using certificates, put there your certificate store name</li>
</ul>
<p><strong>Any configuration changes will require the connector server to be stopped and restarted.</strong></li>
<li>Now, you need to add the active directory connector. Do it so by downloading <a href="http://builds.forgerock.org/job/OpenICF%20-%20Connectors%20(dotnet)/" target="_blank">active directory connector</a> (tested on build #15) and simply unzipping it to Connector Server folder.</li>
<li>Start the Connector Server service (from Microsoft Service Console).</li>
<li>Make sure you have your firewall either turned off or add rule to your firewall to open port which you have set in <strong>ConnectorServer.exe.config</strong></li>
</ol>
<h4>Configuring OpenIDM</h4>
<ol>
<li>When you configure remote connectors, you must use the connector info provider service to connect through remote connector servers. The configuration is stored in the configuration file, <strong>openidm/conf/provisioner.openicf.connectorinfoprovider.json</strong>. A sample can be found in <strong>openidm/samples/provisioners/</strong>.</li>
<li>Make sure the openidm is running and copy the <strong>provisioner.openicf.connectorinfoprovider.json</strong> to <strong>/path/to/openidm/conf </strong>and edit it according to your needs. In my case the file is <a href="http://blogprofiq.files.wordpress.com/2012/11/provisioner-openicf-connectioninfoprovider-json.pdf">provisioner.openicf.connectioninfoprovider.json</a>
<pre>$ cd path/to/openidm
$ cp samples/provisioners/provisioner.openicf.connectorinfoprovider.json conf/</pre>
</li>
<li>As next step you need to create connector file provisioner.openicf-ad.json in conf/ directory. The file should look like the following one <a href="http://blogprofiq.files.wordpress.com/2012/11/provisioner-openicf-ad-json.pdf">provisioner.openicf-ad.json</a></li>
<li>Edit the <strong>configurationProperties</strong> according to your Active Directory setup and also make sure that the <strong>bundleVersion</strong> is the SAME version as <strong>ActioveDirectory.Connector.dll</strong> in Windows Connector Server folder. (Right click on the dll -&gt; properties -&gt; tab details -&gt; Product version)</li>
<li>Check if the connector was installed properly. In openIDM console run following command:
<pre>scr list</pre>
<p>among the all installed modules you should see (number can differ):<br />
<strong><em>[ 24] [active ] org.forgerock.openidm.provisioner.openicf</em></strong><br />
see the content of this connector by:</p>
<pre>scr info 24</pre>
<p>(use the number from your list)</p>
<p>and you should see the content of connector.</li>
<li>Now, you need to create <strong>sync.json</strong> where you define mappings of various attributes and behavior during reconciliation. A simple sync.json could look like this: <a href="http://blogprofiq.files.wordpress.com/2012/11/sync-json.pdf">sync.json</a><br />
After configuring sync.json and placing it to conf/ directory the system should be ready.</li>
</ol>
<h4>Testing the setup</h4>
<ol>
<li>Verify installed connectors (following command has to be on one line):
<pre>curl --header "X-OpenIDM-Username: openidm-admin"  
     --header "X-OpenIDM-Password: openidm-admin" 
     --request POST "http://localhost:8080/openidm/  
       system?_action=CREATECONFIGURATION"  
       | python -mjson.tool</pre>
<p>this command lists all installed connectors. In the list you should see an Active Directory connector.<br />
<strong><em><br />
&#8230;<br />
{<br />
&#8220;bundleName&#8221;: &#8220;ActiveDirectory.Connector&#8221;,<br />
&#8220;bundleVersion&#8221;: &#8220;1.0.0.0&#8243;,<br />
&#8220;connectorHostRef&#8221;: &#8220;dotnet&#8221;,<br />
&#8220;connectorName&#8221;: &#8220;Org.IdentityConnectors.ActiveDirectory.ActiveDirectoryConnector&#8221;,<br />
&#8220;displayName&#8221;: &#8220;Windows Active Directory Connector&#8221;<br />
}<br />
&#8230;<br />
</em></strong></li>
<li>Running reconciliation (following command has to be on one line):
<pre>$ curl --header "X-OpenIDM-Username: openidm-admin" 
       --header "X-OpenIDM-Password: openidm-admin" 
       --request POST "http://localhost:8080/openidm/recon?_action=recon&amp;
         mapping=systemADAccounts_managedUser"</pre>
<p>and as result you should get reconciliation id.<br />
<strong><em>{&#8220;_id&#8221;:&#8221;0629d920-e29f-4650-889f-4423632481ad&#8221;}</em></strong></li>
<li>Check in OpenIDM internal repository (OrientDB or MySQL) if the users were reconciled. How to connect to repo is described <a href="http://openidm.forgerock.org/doc/install-guide/index.html#before-you-begin-sample" target="_blank">here</a> (OrientDB) or <a href="http://openidm.forgerock.org/doc/install-guide/index.html#chap-repository" target="_blank">here</a> (MySQL).<br />
Here is an example of output from OrientDB after reconciling. The red marked user has been reconciled from Active Directory.<a href="http://blogprofiq.files.wordpress.com/2012/11/orientdb.png"><img class="wp-image-2823 aligncenter" title="User In OrientDB after reconciliation" alt="" src="http://blogprofiq.files.wordpress.com/2012/11/orientdb.png?w=344&#038;h=257" height="257" width="344" /></a></li>
</ol>
<br />Filed under: <a href='http://blog.profiq.cz/category/integration/'>Integration</a> Tagged: <a href='http://blog.profiq.cz/tag/ad/'>AD</a>, <a href='http://blog.profiq.cz/tag/forgerock/'>ForgeRock</a>, <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/ldap/'>LDAP</a>, <a href='http://blog.profiq.cz/tag/openicf/'>OpenICF</a>, <a href='http://blog.profiq.cz/tag/openidm/'>OpenIDM</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/2767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/2767/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=2767&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2012/11/14/connecting-openidm-with-microsoft-active-directory-how-to-set-it-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8da4dcc7f1c249f88ee383dd5c10b52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lfolta</media:title>
		</media:content>

		<media:content url="http://blogprofiq.files.wordpress.com/2012/11/dotnetconnectorschema1.jpg" medium="image">
			<media:title type="html">DotNetConnectorSchema</media:title>
		</media:content>

		<media:content url="http://blogprofiq.files.wordpress.com/2012/11/orientdb.png" medium="image">
			<media:title type="html">User In OrientDB after reconciliation</media:title>
		</media:content>
	</item>
		<item>
		<title>How to test your OpenDJ plugin</title>
		<link>http://blog.profiq.cz/2011/10/31/how-to-test-your-opendj-plugin/</link>
		<comments>http://blog.profiq.cz/2011/10/31/how-to-test-your-opendj-plugin/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 08:00:17 +0000</pubDate>
		<dc:creator>N4A L</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[OpenDJ]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://blog.profiq.cz/?p=1687</guid>
		<description><![CDATA[A problem you might face while extending the OpenDJ functionality with a plugin is to develop proper unit tests. OpenDJ comes with a set of tools to facilitate the testing, but since they are tightly integrated within the build framework, you might find it difficult to execute your unit tests from outside of the framework. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=1687&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A problem you might face while extending the OpenDJ functionality with a plugin is to develop proper unit tests. OpenDJ comes with a set of tools to facilitate the testing, but since they are tightly integrated within the build framework, you might find it difficult to execute your unit tests from outside of the framework. This article will try to give you short guidelines on how to integrate and execute your tests.</p>
<p><span id="more-1687"></span></p>
<p><strong>The test</strong></p>
<p>OpenDJ inherited it&#8217;s framework from the OpenDS days which means the old documentation still provides valid guidelines and tips on how to get started with your own unit tests. It would help you get familiar with the utility classes you can use to make your test execution easier. The most relevant documents are:</p>
<ul>
<li><a href="https://www.opends.org/wiki/page/TipsAndTricksForWritingUnitTests">Tips And Tricks For Writing Unit Tests</a></li>
<li><a href="https://www.opends.org/wiki/Wiki.jsp?page=OpenDSUnitTestInstructions">OpenDS Unit Test Instructions</a></li>
</ul>
<div>Of course, if you are not already familiar with <a href="http://testng.org/doc/index.html">TestNG</a>, it is the right moment to get to know it better.</div>
<div>Apart from the documentation mentioned above, you will find it very useful to examine some of the existing unit test classes:</div>
<blockquote>
<div><a href="http://sources.forgerock.org/browse/opendj/trunk/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins">http://sources.forgerock.org/browse/opendj/trunk/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins</a></div>
</blockquote>
<p><strong>The environment</strong></p>
<p>Before you start working on your tests, you have to <a href="https://wikis.forgerock.org/confluence/display/OPENDJ/Guide+to+OpenDJ+Subversion">check out the OpenDJ source file tree</a>. Say, you are developing a plugin for the 2.4 branch, so you would need the latest stable release:</p>
<blockquote>
<pre>mkdir opendj-dev
cd opendj-dev
svn co https://svn.forgerock.org/opendj/branches/b2.4/
cd b2.4</pre>
</blockquote>
<p>Now, your tests should go to:  &#8216;tests/unit-testing/src/server/&lt;package&gt;/&lt;unit test Java class&gt;&#8217; where:</p>
<ul>
<li>&lt;package&gt; is the package which your plugin belongs to, and</li>
<li>&lt;unit test Java class&gt; is the Java class that implements the unit test(s).</li>
</ul>
<p>For example, let&#8217;s assume we have a plugin called &#8216;example plugin&#8217; and we made put it in the &#8216;com.example.plugins&#8217; package (&#8216;com.example.pluginsExamplePlugin). The path would be, say: &#8216;tests/unit-testing/src/server/com/example/plugins/ExamplePluginTestCase.java&#8217;.</p>
<p>Given that your plugin is built separately from the OpenDJ sources, and that the execution of the unit test requires OpenDJ server to be running, you have to make your plugin available to the built-in test instance (and not just the plugin, but also all the libraries you plugin depends on, schema files, etc.). For that to work you need to do the following:</p>
<ul>
<li>create a directory: &#8216;lib/extensions&#8217;;</li>
<li>copy your plugin JAR (and the dependencies) to the following locations: &#8216;lib&#8217; and &#8216;lib/extensions&#8217;;</li>
<li>copy your schema file to: &#8216;resources/schema&#8217;.</li>
</ul>
<p>You should be ready to execute your tests using:</p>
<blockquote><p>./build.sh test -Dtest.classes=&lt;your unit test&gt;</p></blockquote>
<p>If we take our &#8216;example plugin&#8217;, you would do the following:</p>
<blockquote><p># let&#8217;s assume you are located in opendj-dev/b2.4</p>
<p>mkdir lib/extensions</p>
<p>cp &lt;path to&gt;/example-plugin.jar lib</p>
<p>cp &lt;path to&gt;/example-plugin.jar lib/extensions</p>
<p>cp &lt;path to&gt;/99-example-plugin.ldif resources/schema</p>
<p>./build.sh test -Dtest.classes=com.example.plugins.ExamplePluginTestCase</p></blockquote>
<p><strong>Testing and Maven</strong></p>
<p>As previously mentioned, the testing framework of OpenDJ is very tightly integrated with the build process and makes it unavailable to the other frameworks and tools such as Maven.  If you have chosen<a href="http://blog.profiq.cz/2011/10/03/maven-archetype-for-opendj-plugin-development/"> Maven to develop your plugin</a>, you will not be able to execute unit tests using OpenDJ tools and the workaround is to follow the guide above <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://blog.profiq.cz/category/development/'>Development</a>, <a href='http://blog.profiq.cz/category/testing/'>Testing</a> Tagged: <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/java/'>Java</a>, <a href='http://blog.profiq.cz/tag/ldap/'>LDAP</a>, <a href='http://blog.profiq.cz/tag/maven/'>Maven</a>, <a href='http://blog.profiq.cz/tag/opendj/'>OpenDJ</a>, <a href='http://blog.profiq.cz/tag/qa/'>qa</a>, <a href='http://blog.profiq.cz/tag/testing-2/'>testing</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/1687/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/1687/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=1687&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2011/10/31/how-to-test-your-opendj-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3f705da8e67a3505733e77fa0eaba216?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">n4al</media:title>
		</media:content>
	</item>
		<item>
		<title>Maven archetype for OpenDJ plugin development</title>
		<link>http://blog.profiq.cz/2011/10/03/maven-archetype-for-opendj-plugin-development/</link>
		<comments>http://blog.profiq.cz/2011/10/03/maven-archetype-for-opendj-plugin-development/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 06:18:46 +0000</pubDate>
		<dc:creator>N4A L</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ForgeRock]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[OpenDJ]]></category>

		<guid isPermaLink="false">http://blog.profiq.cz/?p=1572</guid>
		<description><![CDATA[We have previously written about the plugin development for OpenDJ based on the example-plugin.zip which comes with the binary distribution. However, as OpenDJ is evolving and slowly migrating to Maven, on the initiative of the ForgeRock team we have come up with the Maven archetype to make the plugin development easier and more developer friendly. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=1572&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>We have previously written about the <a href="http://blog.profiq.cz/2011/08/09/opendj-plugin-development-based-on-example-plugin/">plugin development for OpenDJ based on the example-plugin.zip</a> which comes with the binary distribution. However, as <a title="OpenDJ" href="http://forgerock.com/opendj.html" target="_blank">OpenDJ </a>is evolving and slowly migrating to <a title="Maven" href="http://maven.apache.org/" target="_blank">Maven</a>, on the initiative of the <a title="ForgeRock" href="http://forgerock.com" target="_blank">ForgeRock </a>team we have come up with the Maven archetype to make the plugin development easier and more developer friendly.<span id="more-1572"></span></p>
<p>Maven greatly reduces the effort in the process of development, and the archetype is a step furthere in that direction. What OpenDJ plugin archetype offers is a project template with the necessary tools to focus on the implementation of the funcionality rather then wasting time and resources in managing the build framework. In other words, the plugin archetype does for you most of the tasks outlined in the article &#8220;<a href="http://blog.profiq.cz/2011/08/09/opendj-plugin-development-based-on-example-plugin/" target="_blank">OpenDJ plugin development based on example-plugin</a>&#8220;. <strong></strong></p>
<p><strong>Download and installation </strong></p>
<p>The archetype is currently in development and it is not available from the online repository (ForgeRock or otherwise). However, the latest version can be downloaded from: <a title="OpenDJ plugin archetype" href="https://docs.google.com/uc?id=0BwFb5PXXb_XMOTE1NzA5YjgtN2VlNC00OGIzLWE5ZjgtNjg0YjAzNmI0ODlk&amp;export=download&amp;hl=en_US" target="_blank">here</a>. The downloaded JAR of the archetype has to be deployed in the local repository before you can use it. To do so, you need to execute the following:</p>
<blockquote><p>mvn install:install-file \</p>
<p>-Dfile=opendj-server-plugin-archetype-1.0.0-SNAPSHOT.jar \</p>
<p>-DgroupId=org.forgerock.opendj \</p>
<p>-DartifactId=opendj-server-plugin-archetype \</p>
<p>-Dpackaging=jar \</p>
<p>-Dversion=1.0.0-SNAPSHOT -DgeneratePom=true</p></blockquote>
<p><em>File </em>is the path to the JAR file, and the rest of the parameters should be left as such.</p>
<p>The first step is to create a project for your plugin, let&#8217;s call it <em>Sample Plugin:</em></p>
<blockquote><p>mvn archetype:generate \</p>
<p>-DarchetypeCatalog=local \</p>
<p>-DarchetypeArtifactId=opendj-server-plugin-archetype \</p>
<p>-DarchetypeGroupId=org.forgerock.opendj \</p>
<p>-DarchetypeVersion=1.0.0-SNAPSHOT \</p>
<p>-DgroupId=com.example -DartifactId=sample-plugin \</p>
<p>-Dversion=1.0.0-SNAPSHOT -DmessageFile=sample_plugin \</p>
<p>-DpluginName=SamplePlugin</p></blockquote>
<p>Here is the overview of the parameters:</p>
<ul>
<li><em>archetypeCatalog=local </em>specifies that the archetype should be looked for in the local repository;</li>
<li><em>archetypeArtifactId=opendj-server-plugin-archetype </em>is the ID of the archetype in the catalog;</li>
<li><em>archetypeGroupId=org.forgerock.opendj </em>is the group ID of the archetype;</li>
<li><em>groupId=com.example </em>is the package to which this plugin belongs to, typically you want this for your own company;</li>
<li><em>artifactId=sample-plugin </em>is the name of the artifact, normally it is lower case name of the plugin where spaces are substituted with &#8216;-&#8217; sign;</li>
<li><em>version=1.0-SNAPSHOT </em>is the version your plugin;</li>
<li><em>messageFile=sample_plugin </em>is the name of the file which stores localised messages for the plugin, it should be the lower case version of the plugin name where the space is substituted with the &#8216;_&#8217; sign &#8211; very similar to the artifactId property;</li>
<li><em>pluginName=SamplePlugin </em>is the name of the plugin which would be used to generate the template Java class and plugin configuration in XML, it should be the camel-case version of the plugin, without spaces.</li>
</ul>
<p>This would create a directory which corresponds with the value of <em>artifactId</em>property, in our case: sample-plugin. The directory would be provisioned with the necessary files to produce a working plugin, and the most relevant are:</p>
<blockquote><p>pom.xml</p>
<p>src/main/java/com/example/messages/sample_plugin.properties</p>
<p>src/main/java/com/example/SamplePlugin.java</p>
<p>src/main/java/com/example/SamplePluginConfiguration.xml</p>
<p>src/main/xml</p></blockquote>
<p><em>pom.xml </em>defines the project dependencies and all the phases of the build process. Of course, if your plugin implementation requires additional dependencies, processing and so on, you would want to edit this file accordingly.</p>
<p><em>src/main/java</em> directory contains the package with the Java classes that implement the functionality of the plugin. The package name corresponds to the <em>groupId</em> property, and the files to the <em>messageFile </em>and<em> pluginName</em> properties as explained above. By default, files that are generated contain the code, the configuration and the messages of the example plugin. You may choose to edit those files or simply get rid of them and use them as an example.</p>
<p><em>src/main/xml </em>contains XML framework for processing the plugin configuration and generating the Java code for OpenDJ management infrastructure. Normally, no modifications are required here and if you do modify something, it is very likely something would break. From this point forward, you can start modifying the sources with your own functionality.</p>
<p>In order to generate the plugin it is sufficient to execute:</p>
<blockquote><p>mvn package</p></blockquote>
<p>It would perform the necessary transformations, get the dependencies and generate the plugin JAR. The only thing it does not create is the schema file, which you have to write by hand according to the configuration of the plugin. For more details please refer to the article &#8220;<a href="http://blog.profiq.cz/2011/08/09/opendj-plugin-development-based-on-example-plugin/" target="_blank">OpenDJ plugin development based on example-plugin</a>&#8220;.</p>
<p><strong>Limitations</strong></p>
<p>The archetype currently has several limitations:</p>
<ul>
<li>it cannot generate schema automatically;</li>
<li>it cannot execute unit tests with OpenDJ testing tools.</li>
</ul>
<p><strong>Todo</strong></p>
<p>For the future versions, it is planned to solve the issues listed in the limitations section and to add the capability to generate javadocs.</p>
<p><strong>References</strong> <strong></strong></p>
<p><a href="http://lists.forgerock.org/pipermail/opendj-dev/2011-August/thread.html#589">Discussion on OpenDJ-dev mailing list.</a></p>
<p><a href="https://wikis.forgerock.org/confluence/display/OPENDJ/Maven+tips+and+tricks">Maven tips and tricks for OpenDJ.</a></p>
<p><a href="https://www2.opends.org/wiki/page/ExtendingOpenDSFunctionalityWithAPlugin">Extending OpenDJ functionality with a plugin.</a></p>
<br />Filed under: <a href='http://blog.profiq.cz/category/development/'>Development</a> Tagged: <a href='http://blog.profiq.cz/tag/forgerock/'>ForgeRock</a>, <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/java/'>Java</a>, <a href='http://blog.profiq.cz/tag/ldap/'>LDAP</a>, <a href='http://blog.profiq.cz/tag/opendj/'>OpenDJ</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/1572/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/1572/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=1572&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2011/10/03/maven-archetype-for-opendj-plugin-development/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3f705da8e67a3505733e77fa0eaba216?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">n4al</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenDJ integration with Samba</title>
		<link>http://blog.profiq.cz/2011/08/15/opendj-integration-with-samba/</link>
		<comments>http://blog.profiq.cz/2011/08/15/opendj-integration-with-samba/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 07:00:58 +0000</pubDate>
		<dc:creator>N4A L</dc:creator>
				<category><![CDATA[Integration]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenDJ]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://blogprofiq.wordpress.com/?p=96</guid>
		<description><![CDATA[Although the integration of OpenDJ with Samba is not explicitly documented, it does exist for OpenDS - which, as we already know, is the same product as OpenDJ. However, what is not covered is the synchronisation for the Samba password attributes with the LDAP password. This is the aspect we would try to cover in [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=96&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Although the integration of <a href="http://forgerock.com/opendj.html" target="_blank">OpenDJ </a>with <a href="http://www.samba.org/" target="_blank">Samba </a>is not explicitly documented, it does exist for <a href="http://www.opends.org/" target="_blank">OpenDS </a>- which, as we already know, is the same product as OpenDJ. However, what is not covered is the synchronisation for the Samba password attributes with the LDAP password. This is the aspect we would try to cover in this article.</p>
<p><span id="more-96"></span></p>
<h2>The problem</h2>
<p>In order to have Windows PCs authenticated against Samba, it has to use encoding algorithms specified by Microsoft standards to store the password hashes. For that purpose, it uses two attributes: &#8220;sambaLMPassword&#8221; and &#8220;sambaNTPassword&#8221;. On the other hand, an LDAP directory server would normally use &#8220;userPassword&#8221; attribute to store it&#8217;s own password hash (which, by the way, is usually not according to the Microsoft world).</p>
<p>This situation brings about the issue of password synchronisation between the &#8220;userPassword&#8221; and Samba password attributes. Although Samba provides a feature to synchronise the Samba password with the LDAP password, it does not work in the opposite direction &#8211; when the password is changed though the LDAP, the Samba password attributes remain unchanged.</p>
<p>Solution to this problem can be achieved with a plug-in which intercepts the password changes and synchronises the attributes with appropriate values.</p>
<h2>The plug-in</h2>
<p>OpenDJ has been designed to be highly extensible, so that virtually every aspect of the way it works could be customised. It also comes with an example plug-in which can serve as a good starting basis for development.</p>
<p>Our plug-in covers the following use cases:</p>
<ul>
<li>the user password is changed using LDAP modify operation (replace change type on &#8220;userPassword&#8221; or delete and add change on &#8220;userPassword&#8221;), and</li>
<li>the user password is changed using <a href="http://www.faqs.org/rfcs/rfc3062.html" target="_blank">Password Modify Extended Operation</a>.</li>
</ul>
<div>Limitations:</div>
<div>
<ul>
<li>the password change has to be performed in clear text format, because, if the password is pre-encoded then there is no way for the plug-in to create a new hash for the Samba attributes;</li>
<li>if Samba is using the directory root user (traditionally &#8220;cn=Directory Manager&#8221;) and it is configured to synchronise with LDAP (&#8220;ldap passwd sync&#8221; configuration parameter in <em>smb.conf</em>), then double synchronisation would occur, for example: a user changes the password through Samba, Samba modifies it&#8217;s LDAP attributes and issues a modify operation for &#8220;userPassword&#8221; attribute, the directory intercepts the password change and synchronises it (again) with the Samba attributes through the plug-in;</li>
<li>MD4 hashing algorithm is not available as part of Sun JDK, so the plug-in uses <a href="http://www.bouncycastle.org/" target="_blank">BouncyCastle </a>security provider for this functionality &#8211; it is available separately;</li>
<li>when using <em>ldappasswordmodify </em>tool with the paramter <em>&#8216;-a&#8217; </em>which requires AuthZID format as described in RFC 4513, the plugin would handle only the &#8216;dn:&#8217; syntax but not the &#8216;u:&#8217; syntax.</li>
</ul>
<div>For internal processing, the plug-in differentiates between the operations performed by an authorised user (the user himself or the directory administrator) and a user which can perform changes in the directory on behalf of Samba &#8211; the Samba administrative user. If you have created a special user for this purpose (and given it appropriate privileges, of course) then the plug-in would skip the attribute synchronisation for changes initiated by him &#8211; this way, the double synchronisation is avoided. For that reason, you should not reset the password of a user using this special user outside of Samba, since the synchronisation would not occur. This user, however, must not be the directory administrator (&#8220;cn=Directory Manager&#8221;) because even the valid password resets would be skipped.</div>
<h2>Installation and configuration</h2>
</div>
<p>The basic set-up for OpenDJ integration with Samba is available on the OpenDS wiki page -<a title="Samba as Primary Domain Controler" href="https://www.opends.org/wiki/page/SambaPDCServer" target="_blank">&#8221; Samba as Primary Domain Controler&#8221;</a>. Please note that those are basic instructions for a quick set-up and it might not be appropriate for the production use. For the production, make sure you completely understand both products and how to configure them properly to fir your environment. Among other things, consider using a dedicated user instead of &#8220;cn=Directory Manager&#8221; as noted above.</p>
<p>The installation of the plug-in requires the following steps:</p>
<ol>
<li>copy the JAR file to the OpenDJ directory tree;</li>
<li>install the plug-in schema;</li>
<li>restart the directory, and</li>
<li>configure the plug-in.</li>
</ol>
<div>The actual plug-in comes as <em><a href="https://docs.google.com/leaf?id=0BwFb5PXXb_XMNjRhNjA5OGUtMTc3MC00ZDM3LTk0YzAtZTA2Y2Q2ZmEyYzdl&amp;hl=en_US">samba-password-plugin.jar</a> </em>archive and needs to be copied to: <em>&lt;OpenDJ&gt;/lib/extensions.</em></div>
<div><em></em>For the plug-in to be configured successfully, the directory schema has to be extended. The schema file <em><a href="https://docs.google.com/leaf?id=0Bxg8NMgYhFOuYmU4ZWNlZWMtOGVhNC00OGUyLWE5OTgtMWEzNWNlY2Q5YTJi&amp;hl=en_US&amp;authkey=CMOPjf8J">99-samba-password-plugin.ldif</a> </em> needs to be copied to: <em>&lt;OpenDJ&gt;/config/schema.</em> The plugin depends on the <a href="http://www.bouncycastle.org/">BouncyCastle </a>MD4 implementation, and so the BC provider JAR has to be downloaded and installed in the <em>&lt;OpenDJ&gt;/lib </em>directory along with the plugin JAR.</div>
<div><em><br />
</em></div>
<div>To have the directory load the plug-in, it has to be restarted. On the start-up, observe the following message (or something alike):</div>
<div>
<blockquote>
<pre>[21/Apr/2011:19:29:18 +0200] category=EXTENSIONS severity=INFORMATION
msgID=1049147 msg=Loaded extension from file
'/opt/ds-1/lib/extensions/samba-password-plugin.jar' (build 1.0,
revision 20110420125558)</pre>
</blockquote>
</div>
<div>Of course, look out for any error messages. After you confirm the plug-in has been successfully loaded and the directory up and running, you can proceed to the configuration:</div>
<blockquote>
<pre>dsconfig -X create-plugin -D "cn=directory manager" \
-w &lt;password&gt; -h localhost \
--plugin-name "Samba Password Synchronisation" \
--type samba-password --set enabled:true \
--set samba-oc:sambaSAMAccount</pre>
</blockquote>
<div>If you want to configure it interactively, you would need to be ready to provide the information about your Samba setup. It includes:</div>
<div>
<ul>
<li>Samba object class (&#8220;samba-oc&#8221; property) &#8211; it is the object class which identifies the entries with Samba attributes, typically it is &#8220;sambaSAMAccount&#8221;;</li>
<li>the attribute for the LanMan password hash if used, typically it is &#8220;sambaLMPassword&#8221; but it can be undefined if not used;</li>
<li>the attribute for the NT password hash, typically &#8220;sambaNTPassword&#8221; &#8211; this value is provided by default, and</li>
<li>Samba administrative user, that is, the user which has privileges to perform the account maintenance on behalf of Samba.</li>
</ul>
<div>The configuration values are verified against the current directory configuration and contents, so you have to make sure the schema for Samba is already loaded, the attributes correspond to the object class you have provided and the user exists with the &#8220;password-reset&#8221; privilege. Note that you would have to modify ACI rules for the administrative user, but that depends on your security policy so it is not checked by the plug-in.</div>
<p>That&#8217;s it! Now you are ready to go.</p>
<h2>Debugging</h2>
<p>In case you experience issues, the best way to troubleshoot is via debug log. The debug log is not enabled by default and it would need some setup:</p>
<ul>
<li>create the debug target:</li>
</ul>
</div>
<blockquote>
<pre>dsconfig -X -n create-debug-target -D "cn=directory manager" \
-w &lt;password&gt; -h localhost --publisher-name "File-Based Debug Logger" \
--target-name cz.profiq.opendj.plugins.SambaPasswordPlugin \
--set debug-level:all</pre>
</blockquote>
<div>
<ul>
<li>enable the debug log:</li>
</ul>
</div>
<blockquote>
<pre>dsconfig -X -n set-log-publisher-prop -D "cn=directory manager" \
-w &lt;password&gt; -h localhost --publisher-name "File-Based Debug Logger" \
--set enabled:true</pre>
</blockquote>
<div>
<h2>Useful resources</h2>
<ul>
<li><a href="https://www.opends.org/1.0/page/ExtendingOpenDSFunctionalityWithAPlugin" target="_blank">Extending Open DS Functionality With A Plugin</a></li>
<li><a href="http://www.opends.org/promoted-builds/2.2.0/javadoc/index.html" target="_blank">OpenDS API</a></li>
<li><a href="http://www.bouncycastle.org/latest_releases.html" target="_blank">The Legion of the Bouncy Castle</a></li>
<li><a href="http://en.wikipedia.org/wiki/LM_hash" target="_blank">LAN Manager hash</a></li>
<li><a href="http://en.wikipedia.org/wiki/NTLM" target="_blank">NT LAN Manager</a></li>
</ul>
<p>Note that the plugin has been contributed to the <a href="http://opendj.forgerock.org/">OpenDJ Community</a> and it forms part of OpenDJ 2.5.0.</p>
</div>
<br />Filed under: <a href='http://blog.profiq.cz/category/integration/'>Integration</a> Tagged: <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/java/'>Java</a>, <a href='http://blog.profiq.cz/tag/opendj/'>OpenDJ</a>, <a href='http://blog.profiq.cz/tag/samba/'>Samba</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=96&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2011/08/15/opendj-integration-with-samba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3f705da8e67a3505733e77fa0eaba216?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">n4al</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenDJ plugin development based on example-plugin</title>
		<link>http://blog.profiq.cz/2011/08/09/opendj-plugin-development-based-on-example-plugin/</link>
		<comments>http://blog.profiq.cz/2011/08/09/opendj-plugin-development-based-on-example-plugin/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 07:00:11 +0000</pubDate>
		<dc:creator>N4A L</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[OpenDJ]]></category>

		<guid isPermaLink="false">http://blogprofiq.wordpress.com/?p=262</guid>
		<description><![CDATA[While OpenDS plugin development was fairly well documented, it has evolved with OpenDJ while available information has not. I will try here to share some of my experience which might help you save some time until the plugin API becomes stable enough to be officially documented. The starting point for documentation is: Extending OpenDS Functionality [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=262&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>While OpenDS plugin development was fairly well documented, it has evolved with OpenDJ while available information has not. I will try here to share some of my experience which might help you save some time until the plugin API becomes stable enough to be officially documented.</p>
<p><span id="more-262"></span>The starting point for documentation is:</p>
<ul>
<li>
<p id="section-ExtendingOpenDSFunctionalityWithAPlugin-ExtendingOpenDSFunctionalityWithAPlugIn"><a href="https://www.opends.org/wiki//page/ExtendingOpenDSFunctionalityWithAPlugin">Extending OpenDS Functionality With a Plug-In</a></p>
</li>
<li><a href="http://opendj.forgerock.org/opendj-server/javadoc/index.html">OpenDJ server API</a></li>
</ul>
<p>You should read the first document listed and try to understand it before you start developing your own plugin, otherwise the rest of the article would not make much sense.</p>
<h3>Files, naming and dependencies</h3>
<p>The good base to start developing your own extension is the example plugin delivered in the OpenDJ binary distribution as <em>example-plugin.zip</em>. You can start by unzipping it and renaming the folder to your custom name. This is a good moment to think about the name of the plugin since it affects the way supporting classes are generated. Although the folder name has no effect, you would normally use the same name on multiple places in the sources. The name &#8216;example-plugin&#8217; would generate classes with name &#8216;ExamplePlugin*&#8217;, &#8216;my-custom-plugin&#8217; would result in &#8216;MyCustomPlugin*&#8217;, while &#8216;mycustom-plugin&#8217; would turn out to be &#8216;MycustomPlugin*&#8217; &#8211; obviously, the &#8216;-&#8217; sign would cause the class names to be generated with camel case and the framework would require the class names to follow the case in order to compile them. The most important thing here is to pick a name and stick to it.</p>
<blockquote>
<pre>unzip example-plugin.zip
mv example-plugin my-plugin</pre>
</blockquote>
<p>The plugin generation framework depends on <a href="http://xml.apache.org/xalan-j/">Xalan-Java</a> as a workaround for a JDK-related XML processing bug, hence you should download the latest distribution of it and unpack it to the <em>ext/ </em>folder as <em>xalan-j </em>since that&#8217;s what <em>build.xml</em> expects to find.</p>
<blockquote>
<pre>unzip -d my-plugin/ext xalan-j*.zip
cd my-plugin/ext
mv xalan-j* xalan-j</pre>
</blockquote>
<p>Apart from Xalan-Java, the build framework depends on <a href="http://ant-contrib.sourceforge.net/">ant-contrib</a> tasks which you have to download and deploy inside the folder where <em>ant</em> would find it (or specify the location with the <em>ant </em>command line parameters).</p>
<p>Next step could be to modify <em>build.xml</em> so it fits the purpose of your custom plugin. The properties to change could be:</p>
<ul>
<li>name under project tag</li>
<li>&lt;description&gt; tag</li>
<li>pkg.name</li>
<li>pkg.description</li>
</ul>
<p>Sources are inside the <em>src/ </em>folder followed by the folders which mark the package name, as usual. You might want to rename the <em>com.example.opends </em>to something more fitting to your company or project. In <em>resource/ </em>folder you would find <em>schema/ </em>and <em>messages/ </em>relevant. The schema file in <em>schema/ </em>folder should follow the name you have chosen in the form &#8217;99-NAME.ldif&#8217;, for example: &#8217;99-my-example-plugin.ldif&#8217; &#8211; although this would not impact the building process, the naming would be consistent. The <em>messages/ </em>directory contains the properties file(s) with the error messages and their localisation organised in the folders that follow the name of the package. Again, another part which should be renamed following the chosen name.</p>
<p>Note that <em>resources/ </em>folder contains <em>config/ </em>which in turn has a file with LDIF representation of the configuration defined in the XML file. That file (and folder for that matter) is not needed contrary to what README file says. Previously this file was used to configure the plugin by injecting it to the <em>config.ldif </em>file, but as the software evolved, this step is now performed with the <em>dsconfig </em>command. More about that later.</p>
<p>You will find your development process bouncing between the: source files which implement the plugin functionality, the configuration file for the plugin which is used to generate dependent classes, the properties file which defines the messages and, to smaller extent, the schema file.</p>
<p>The files we find in the sources folder of the example plugin are: <em>ExamplePlugin.java, ExamplePluginConfiguration.xml, Package.xml</em> and <em>package-info.java</em>. &#8216;ExamplePlugin*&#8217; files are the ones that should be renamed to match the name you have chosen, say, if you have chosen &#8216;my-example-plugin&#8217; then they should be: <em>MyExamplePlugin.java </em>and<em> MyExamplePluginConfiguration.xml</em>. Next, you should modify<em> MyExamplePluginConfiguration.xml</em> not only to match your configuration needs but also your naming choice (&#8216;name&#8217; property, &#8216;package&#8217; property, etc.). Based on the information in the configuration file, the build framework would generate classes in <em>src-generated/ </em>folder which would follow the names and packages properties, so if you do not name everything consistently and refer to it in your sources, the compilation process would fail. Needless to say, the contents of <em>Packages.xml</em> should match the rest of the configuration.</p>
<p>The relationship of the most important files is the following:</p>
<ul>
<li><em>src/com/example/opends/</em>ExamplePlugin.java contains the functionality of the plugin;</li>
<li><em>src/com/example/opends/</em>ExamplePluginConfiguration.xml defines the configuration parameters for the plugin (set with the <em>dsconfig </em>command) which can be accessed via &#8216;config&#8217; object inside the code;</li>
<li><em>resources/messages/com/example/opends/messages/</em>example_plugin.properties defines the localised messages (for the given locale) which can be accessed from the code in a generic way, and</li>
<li><em>resources/schema/</em>99-example-plugin.ldif is the schema definition for the parameters defined in the configuration file.</li>
</ul>
<p>As you develop the functionality of the plugin, you will find it necessary to update the configuration and/or the messages which would require you re-generate the dependant files, otherwise if you use an IDE for development, the changes would not be reflected.</p>
<h3>Notes on the configuration</h3>
<p>The configuration parameters defined in the configuration file are represented in the directory as LDAP entries, hence when you define new parameters you are really defining new object class and new attributes. Logically, in order to have the directory updated with the plugin configuration, it has to contain the schema with the definition of the object classes and attributes you want to add. The parameters need not be reflected in the schema files during the time of development &#8211; it is only important to update it before you install the plugin, as the schema definition is important for the directory server to be able to create the plugin and create it&#8217;s configuration.</p>
<p>To get the better idea of how to set up the schema file, you can compare the <em>ExamplePluginConfiguration.xml </em>with <em>99-example-plugin.ldif. </em>Another helpful example might be found in the Samba password syncronisation plugin: <em><a href="https://www.assembla.com/code/tamni-vilajet/subversion/nodes/trunk/opendj/plugins/samba-password-plugin/src/cz/profiq/opendj/plugins/SambaPasswordPluginConfiguration.xml?rev=56">SambaPasswordPluginConfiguration.xml</a>, <a href="https://www.assembla.com/code/tamni-vilajet/subversion/nodes/trunk/opendj/plugins/samba-password-plugin/resource/schema/99-samba-password-plugin.ldif?rev=56">99-samba-password-plugin.ldif</a>.</em></p>
<h3>Creating a NetBeans project</h3>
<p>If you want to develop your plugin as a NetBeans project, here is a simple way to do it:</p>
<ol>
<li>click on the <em>New Project</em> button;</li>
<li>choose <em>Java Free-form Project </em>from the <em>Java </em>category;</li>
<li>set the <em>Location</em> to the folder of your plugin;</li>
<li>click <em>Next</em></li>
<li>click <em>Next</em></li>
<li>uncheck <em>Separate Classpath&#8230;</em>, and add <em>OpenDJ.jar</em></li>
<li>click <em>Finish</em></li>
</ol>
<p>This configuration would relay on the existing <em>build.xml</em> script to build everything, so you might want to update the menu with relevant targets such as <em>compileadmin, generate-messages, package, install</em>, etc.</p>
<h3>Compiling and installing</h3>
<p>If your code relies on external libraries, such as <a href="http://opendj.forgerock.org/opendj-ldap-sdk/">OpenDJ SDK</a>, they should go to the <em>ext/ </em>directory.</p>
<p>The most relevant <em>ant </em>targets are:</p>
<ul>
<li><em>compileadmin </em>- generates the dependent classes (based on the XML file);</li>
<li><em>generate-messages</em> &#8211; generates the messages (based on the properties file);</li>
<li><em>compile/package &#8211; </em>compiles the sources/creates the jar ready to install, and</li>
<li><em>install</em> &#8211; installs the plugin</li>
</ul>
<p>Installation of the plugin is not a single step which depends on the <em>ant </em>target, but requires various actions. Running the <em>install </em>target with <em>ant</em> would copy the plugin JAR, the schema and the configuration LDIF to the relevant folders under the location specified by the <em>opends.install.dir </em>property in <em>build.xml </em>(respectively, by default: ../lib/extensions, ../config)<em>. </em>As noted previously, the configuration LDIF is obsolete and should be removed so that it is not copied at all. The external libraries would not be copied (you would have to do that by hand), and the installation would have effect only upon the restart. Startup messages would indicate if the plugin was loaded and if there were any errors with the schema file.</p>
<p>The installation does not end here as the plugin has to be registered, configured and enabled in order to be used. All of that can be done in a single line with the <em>dsconfig </em>tool. For example:</p>
<blockquote>
<pre>dsconfig -X -n create-plugin --plugin-name "My Example Plugin" \
--type my-example-plugin --set enabled:true --set some-property:value</pre>
</blockquote>
<h3>Debugging</h3>
<p>Most of the time, when a problem occurs, you would want to know what is happening inside your code. For this purpose you can define a debug logger and log whatever you find useful. To do that, you should create a <em>DebugTracer </em>object as a static member of your class:</p>
<blockquote>
<pre>  private static final DebugTracer TRACER = DebugLogger.getTracer();</pre>
</blockquote>
<p><em></em>The messages logged with the <em>TRACER</em> need debugging to be enabled in the directory and you can do that with the <em>dsconfig </em>command:</p>
<ul>
<li>create the debug target:</li>
</ul>
<blockquote>
<pre>dsconfig -X -n create-debug-target \
--publisher-name "File-Based Debug Logger" \
--target-name com.example.opends.ExamplePlugin --set debug-level:all</pre>
</blockquote>
<ul>
<li>enable the debug log:</li>
</ul>
<blockquote>
<pre>dsconfig -X -n set-log-publisher-prop \
--publisher-name "File-Based Debug Logger" --set enabled:true</pre>
</blockquote>
<h3>Easier way</h3>
<p>Although still work in progress, <a href="http://blog.profiq.cz/2011/10/03/maven-archetype-for-opendj-plugin-development/">Maven archetype for OpenDJ plugins</a> is an easier alternative. It will perform all the steps necessary to keep you focused on coding and less on the internal dependencies of the example plugin.</p>
<h3>Useful resources</h3>
<ul>
<li><a href="https://www.assembla.com/code/tamni-vilajet/subversion/nodes/trunk/opendj/plugins/samba-password-plugin?rev=56">Samba password synchronization plugin</a> sources</li>
<li><a href="http://opendj.forgerock.org/opendj-ldap-sdk/">OpenDJ SDK</a></li>
<li><a href="http://sources.forgerock.org/changelog/opendj/trunk/">OpenDJ sources</a></li>
</ul>
<br />Filed under: <a href='http://blog.profiq.cz/category/development/'>Development</a> Tagged: <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/java/'>Java</a>, <a href='http://blog.profiq.cz/tag/ldap/'>LDAP</a>, <a href='http://blog.profiq.cz/tag/opendj/'>OpenDJ</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/262/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=262&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2011/08/09/opendj-plugin-development-based-on-example-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3f705da8e67a3505733e77fa0eaba216?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">n4al</media:title>
		</media:content>
	</item>
		<item>
		<title>Notes on OpenDJ integration with Liferay</title>
		<link>http://blog.profiq.cz/2011/08/08/notes-on-opendj-integration-with-liferay/</link>
		<comments>http://blog.profiq.cz/2011/08/08/notes-on-opendj-integration-with-liferay/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 08:30:06 +0000</pubDate>
		<dc:creator>N4A L</dc:creator>
				<category><![CDATA[Integration]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Liferay]]></category>
		<category><![CDATA[OpenDJ]]></category>

		<guid isPermaLink="false">http://blogprofiq.wordpress.com/?p=98</guid>
		<description><![CDATA[Liferay is a popular open source portal solution written in J2EE technology. It features abundance of portlets and plug-ins, as well as many integration options for popular access management and identity solutions. Unfortunately, OpenDJ is not found anywhere in the official (or extra official) documentation. No need to worry as the set-up is more or [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=98&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.liferay.com/">Liferay </a>is a popular open source portal solution written in J2EE technology. It features abundance of portlets and plug-ins, as well as many integration options for popular access management and identity solutions. Unfortunately, OpenDJ is not found anywhere in the official (or extra official) documentation. No need to worry as the set-up is more or less trouble-free.</p>
<h2><span id="more-98"></span>Web Interface set-up</h2>
<p><a href="http://forgerock.com/opendj.html">OpenDJ</a>, formerly known as <a href="http://www.opends.org/">OpenDS</a> is a full implementation of the LDAP version 3 which is also supported by Liferay as a client. Hence, the integration as a generic LDAP service is rather trivial if performed via Web interface:</p>
<ul>
<li>we need to log in as the administrator and open the <em>Control Panel </em>in the <em>Manage </em>drop-down menu;</li>
<li>we choose the <em>Settings</em> option within the <em>Portal </em>section;</li>
<li>here, on the left side, under <em>Configuration</em> options, we chose <em>Authentication, </em>and finally <em>LDAP;</em></li>
<li>we <em>Add</em> the server;</li>
<li><strong>name </strong>parameter identifies this particular server instance;</li>
<li><em>Other Directory Server </em>should be selected as a generic LDAP server.</li>
</ul>
<div>Connection:</div>
<ul>
<li><strong>Base Provider URL</strong> represents the server host and port in the <a href="http://www.ietf.org/rfc/rfc2255.txt">URI syntax</a>;</li>
<li><strong>Base DN</strong> is the starting point in the tree where all the searches should start from;</li>
<li><strong>Principal </strong>is the user which Liferay uses to connect to the directory and perform required operations;</li>
<li><strong>Credentials </strong>is the password of the <strong>principal.</strong></li>
</ul>
<div>Users:</div>
<ul>
<li><strong>Authentication Search Filter</strong> is the filter Liferay would use to search for the Liferay users (hoovering over the question mark gives more information on the type of variables that could be used to perform the mapping of Liferay fields to LDAP attributes);</li>
<li><strong>Import Search Filter</strong> is used to identify the LDAP entries to be imported to Liferay user database, if the import option has been set to true;</li>
<li><strong>Screen Name </strong>is the LDAP attribute which will be used for the value of Liferay screen name, by defualt it is &#8220;cn&#8221; but it could also be &#8220;uid&#8221;, depending on your directory design;</li>
<li><strong>Password </strong>is the LDAP attribute which holds the user password hash, default is &#8220;userPassword&#8221; which is also the default value for OpenDJ;</li>
<li><strong>E-mail Address </strong>is the LDAP attribute for the e-mail address, by default &#8220;mail&#8221;;</li>
<li><strong>Full Name </strong>is the LDAP attribute for the full name of the user, by default it is empty, but typically it is &#8220;cn&#8221;;</li>
<li><strong>First Name </strong>is the LDAP attribute for the first name of the user, by default it is &#8220;givenName&#8221;;</li>
<li><strong>Middle Name </strong>is the LDAP attribute for the given name, by default it is empty;</li>
<li><strong>Last Name </strong>is the LDAP attribute for the last name, by default it is &#8220;sn&#8221;;</li>
<li><strong>Job Title </strong>is the LDAP attribute for the job title, by default it is &#8220;title&#8221;;</li>
<li><strong>Group Membership </strong>is the LDAP attribute which lists the groups which the user belongs to, in OpenDJ this should be set to the operational attribute &#8220;isMemberOf&#8221;.</li>
</ul>
<div>Groups:</div>
<div>
<ul>
<li><strong>Import Search Filter </strong>is the LDAP filter which identifies the entries representing groups to be imported into the Liferay database if the import option has been set to true;</li>
<li><strong>Group Name </strong>is the LDAP attribute which holds the name of the group, it defaults to &#8220;cn&#8221;;</li>
<li><strong>Description </strong>is the LDAP attribute which holds the description of the group, it defaults to &#8220;description&#8221;;</li>
<li><strong>User </strong>is the LDAP attribute which identifies the LDAP entry belonging to the group, it defaults to &#8220;uniqueMember&#8221;.</li>
</ul>
<div>Export:</div>
<div>
<ul>
<li><strong>Users DN </strong>is the distinguished name of the LDAP branch which holds the user entries;</li>
<li><strong>User Default Object Classes </strong>represents the object class hierarchy for the user entries, it defaults to &#8220;top,person,inetOrgPerson,organizationalPerson&#8221;;<strong><br />
</strong></li>
<li><strong>Groups DN </strong>is the distinguished name of the LDAP branch which holds the group entries;<strong><br />
</strong></li>
<li><strong>Group Default Object Classes </strong>represents the object class hierarchy for the group entries, it defaults to &#8220;top,groupOfUniqueNames&#8221;.<strong><br />
</strong></li>
</ul>
<div>Most of the default values are reasonable and correspond to the standard schema, so you would normally want to leave them as such. However, apart from the minor changes that might be needed in order to reflect your directory design, the most notable parameter would be the &#8220;group membership&#8221; which you would want changed to &#8220;isMemberOf&#8221;.</div>
<h2>Properties file setup</h2>
<p>Although most of the parameters are configurable through the web interface, there are a few more which can be set only within the <em>portal-ext.properties </em>file. Please note that the web interface settings take precedence over the properties file, so if you have the same parameter set in both places, only the one in the web interface would be used.</p>
<p>The properties file has to be created in:</p>
<blockquote><p>&lt;web server root&gt;/webapps/ROOT/WEB-INF/classes</p></blockquote>
<p>The LDAP parameters with their default values are:</p>
<blockquote>
<pre>ldap.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.base.provider.url=ldap://localhost:10389
ldap.base.dn=dc=example,dc=com
ldap.security.principal=uid=admin,ou=system
ldap.security.credentials=secret
ldap.referral=follow
ldap.auth.enabled=false
ldap.auth.required=false
ldap.auth.method=bind
#ldap.auth.method=password-compare
ldap.auth.password.encryption.algorithm=
ldap.auth.password.encryption.algorithm.types=MD5,SHA
ldap.auth.search.filter=(mail=@email_address@)
ldap.user.default.object.classes=top,person,inetOrgPerson,
organizationalPerson
ldap.user.mappings=uuid=uuid\nscreenName=cn\npassword=userPassword\n
emailAddress=mail\nfirstName=givenName\nlastName=sn\njobTitle=title\n
group=groupMembership
ldap.group.default.object.classes=top,groupOfUniqueNames
ldap.group.mappings=groupName=cn\ndescription=description\n
user=uniqueMember
ldap.import.enabled=false
ldap.import.on.startup=false
ldap.import.interval=10
ldap.import.user.search.filter=(objectClass=inetOrgPerson)
ldap.import.group.search.filter=(objectClass=groupOfUniqueNames)
ldap.import.method=user
#ldap.import.method=group
ldap.import.create.role.per.group=false
ldap.export.enabled=true
ldap.users.dn=ou=users,dc=example,dc=com
ldap.groups.dn=ou=groups,dc=example,dc=com
ldap.password.policy.enabled=false
ldap.error.password.age=age
ldap.error.password.expired=expired
ldap.error.password.history=history
ldap.error.password.not.changeable=not allowed to change
ldap.error.password.syntax=syntax
ldap.error.password.trivial=trivial
ldap.error.user.lockout=retry limit</pre>
</blockquote>
<p>As you can see, most of the parameters are the same as on the web interface, so we will focus on those that differ and affect the integration with OpenDJ:</p>
<ul>
<li><strong>ldap.auth.method, ldap.auth.password.encryption.algorithm </strong>and <strong>ldap.auth.password.encryption.algorithm.types </strong>are complementary and define the way Liferay handles authentication: <em>ldap.auth.method </em>can have two possible values: <em>bind</em> or <em>password-compare<strong>. </strong><em>bind </em></em>means the portal would try to perform an LDAP bind operation as the provided user and credentials (looking up it&#8217;s DN with what is provided as the <em>search filter</em> parameter), and <em>password-compare</em> would generate a hash of the provided password and compare it to the has stored in the attribute specified as <em>password </em>parameter. For the second option, <em>ldap.auth.password.encryption.algorithm </em> and <em>type </em>specify which algorithms to use to produce the hash so that it can be matched to the hash in the directory.</li>
<li><strong>ldap.import.method </strong>can be used to specified the way the LDAP entries are identified for importing (if this feature has been enabled). The possible values are: <em>user </em>and <em>group</em>. <em>user </em>option would use parameters specified for the user discovery (<em>import filter</em> and the attribute mapping), while the <em>group </em>option would first look for the groups and then import all members of the found groups.</li>
<li>although <strong>ldap.password.policy.enabled </strong>parameter exists in the web interface, the parameters which accompany it can be defined only the properties file. This parameter specifies that the Liferay should relay on the directory to handle the password policies (expiration, disabling and such) and the rest of the parameters define portions of the error messages returned by the directory which identify the state the account is in. Those parameters are: <strong><span style="color:#000000;">ldap.error.password.age, ldap.error.password.expired, ldap.error.password.history, ldap.error.password.not.changeable, ldap.error.password.syntax, ldap.error.password.trivial, ldap.error.user.lockout. </span></strong><span style="color:#000000;">Although, only <strong>ldap.error.user.lockout</strong> and <strong>ldap.error.password.expired </strong>are relevant as the LDAP authentication module does not verify any other.</span></li>
</ul>
<h3>LDAP password policy parameters</h3>
<p>OpenDJ does not give the reason for the authentication failure by default as a security measure, but this option can be changed:</p>
<blockquote><p>dsconfig -n -X set-global-configuration-prop &#8211;set return-bind-error-messages:true</p></blockquote>
<p>Possible values might be:</p>
<blockquote>
<pre>ldap.error.user.lockout=locked
ldap.error.password.not.changeable=password cannot be changed
ldap.error.password.syntax=password validator</pre>
</blockquote>
<p>The portal would try to match the portions of the message returned by the directory and then act upon it. Note that <strong>ldap.error.password.syntax </strong>and <strong>ldap.error.password.trivial </strong>depend on the particular password validator out you happen to use. All password validators have &#8220;password validator&#8221; as a common part in the message, but the actual reason differs depending on the particular error. The rest of the parameters are static and some even correspond with the defaults.</p>
<h2>OpenDJ Password Policy settings</h2>
<p>In order to delegate the use of password policies from the directory to the portal, the directory password policies have to be configured with your custom values:</p>
<blockquote><p>dsconfig -X -D &#8220;cn=directory manager&#8221; -w password set-password-policy-prop &#8211;policy-name &#8220;default password policy&#8221;</p></blockquote>
<p>Hope it helps!</p>
<p><strong>UPDATE: </strong>On the petition of Liferay Community, this article has been added to the Liferay Community Wiki:</p>
<p><a href="http://www.liferay.com/es/community/wiki/-/wiki/Main/LDAP+support+with+OpenDJ">http://www.liferay.com/es/community/wiki/-/wiki/Main/LDAP+support+with+OpenDJ</a></p>
</div>
</div>
<br />Filed under: <a href='http://blog.profiq.cz/category/integration/'>Integration</a> Tagged: <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/j2ee/'>J2EE</a>, <a href='http://blog.profiq.cz/tag/java/'>Java</a>, <a href='http://blog.profiq.cz/tag/ldap/'>LDAP</a>, <a href='http://blog.profiq.cz/tag/liferay/'>Liferay</a>, <a href='http://blog.profiq.cz/tag/opendj/'>OpenDJ</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=98&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2011/08/08/notes-on-opendj-integration-with-liferay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3f705da8e67a3505733e77fa0eaba216?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">n4al</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenDJ (aka OpenDS) integration series of articles</title>
		<link>http://blog.profiq.cz/2011/08/06/opendj-aka-opends-integration-series-of-articles/</link>
		<comments>http://blog.profiq.cz/2011/08/06/opendj-aka-opends-integration-series-of-articles/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 08:32:15 +0000</pubDate>
		<dc:creator>N4A L</dc:creator>
				<category><![CDATA[Integration]]></category>
		<category><![CDATA[DSEE]]></category>
		<category><![CDATA[ForgeRock]]></category>
		<category><![CDATA[IdM]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[OpenDJ]]></category>
		<category><![CDATA[OpenDS]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Sun Microsystems]]></category>

		<guid isPermaLink="false">http://blogprofiq.wordpress.com/?p=94</guid>
		<description><![CDATA[Sun Microsystems merger with Oracle has created a gap not only in the identity market but also in the continuity of the Sun identity offerings. Once a market leader (and for the moment being still is), Sun Java System Directory Server (also known under many other marketing names such as SunONE and iPlanet) has uncertain [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=94&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://forgerock.com"><img class="alignleft" title="ForgeRock" src="http://forgerock.com/sites/default/files/forgerock_logo.png" alt="" /></a>Sun Microsystems merger with Oracle has created a gap not only in the identity market but also in the continuity of the Sun identity offerings. Once a market leader (and for the moment being still is), Sun Java System Directory Server (also known under many other marketing names such as SunONE and iPlanet) has uncertain future as the new pricing model (i.e. it is not getting any cheaper) puts the customers in a situation to look for the alternatives. What Sun thought of being it&#8217;s own open source alternative, OpenDS, does not have a very active development and the users keep asking what is the strategy of Oracle for the ex-Sun products as the roadmap has not been updated ever since the merger. Fortunately, a young Norwegian company called ForgeRock has taken on the task of reviving Sun&#8217;s open source offering and fill the gap created by Oracle. One of their products is OpenDJ, a living version of OpenDS.</p>
<p><span id="more-94"></span>Op<a href="http://forgerock.com/opendj.html"><img class="alignleft" title="OpenDJ aka OpenDS" src="http://opendj.forgerock.org/images/opendj-tagline-179x65.png" alt="OpenDJ aka OpenDS" /></a>enDJ and OpenDS are essentially the same product which was developed by the same people who developed the original SJS Directory Server. As of the Oracle-Sun merger, the development team moved on to ForgeRock where they keep the development active. Although the maturity level of the product is quite high, the amount of information around it is not sufficient. Our goal at profiq is to start a series of articles on different aspects of integration of OpenDJ with other popular open source products and rise the awareness of this great product.</p>
<br />Filed under: <a href='http://blog.profiq.cz/category/integration/'>Integration</a> Tagged: <a href='http://blog.profiq.cz/tag/dsee/'>DSEE</a>, <a href='http://blog.profiq.cz/tag/forgerock/'>ForgeRock</a>, <a href='http://blog.profiq.cz/tag/idm/'>IdM</a>, <a href='http://blog.profiq.cz/tag/ldap/'>LDAP</a>, <a href='http://blog.profiq.cz/tag/opendj/'>OpenDJ</a>, <a href='http://blog.profiq.cz/tag/opends/'>OpenDS</a>, <a href='http://blog.profiq.cz/tag/oracle/'>Oracle</a>, <a href='http://blog.profiq.cz/tag/sun-microsystems/'>Sun Microsystems</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogprofiq.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogprofiq.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.profiq.cz&#038;blog=23136985&#038;post=94&#038;subd=blogprofiq&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.profiq.cz/2011/08/06/opendj-aka-opends-integration-series-of-articles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/3f705da8e67a3505733e77fa0eaba216?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">n4al</media:title>
		</media:content>

		<media:content url="http://forgerock.com/sites/default/files/forgerock_logo.png" medium="image">
			<media:title type="html">ForgeRock</media:title>
		</media:content>

		<media:content url="http://opendj.forgerock.org/images/opendj-tagline-179x65.png" medium="image">
			<media:title type="html">OpenDJ aka OpenDS</media:title>
		</media:content>
	</item>
	</channel>
</rss>