directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r836607 - in /websites/staging/directory/trunk/content: ./ apacheds/basic-ug/ apacheds/basic-ug/images/ apacheds/basic-ug/resources/
Date Tue, 30 Oct 2012 16:17:04 GMT
Author: buildbot
Date: Tue Oct 30 16:17:04 2012
New Revision: 836607

Log:
Staging update by buildbot for directory

Added:
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/delete-entry.png   (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/import-entry-studio.png   (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/keystore-configuration.png   (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/ldif-import-file-select.png   (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/resources/captain-hook-hierarchy.ldif
Removed:
    websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.3-modifying-entries.html
    websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.4-moving-entries.html
Modified:
    websites/staging/directory/trunk/content/   (props changed)
    websites/staging/directory/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.html
    websites/staging/directory/trunk/content/apacheds/basic-ug/2.1-data-modification.html
    websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.1-adding-entries.html
    websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.2-deleting-entries.html
    websites/staging/directory/trunk/content/apacheds/basic-ug/3.1-authentication-options.html
    websites/staging/directory/trunk/content/apacheds/basic-ug/3.3-enabling-ssl.html

Propchange: websites/staging/directory/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Oct 30 16:17:04 2012
@@ -1 +1 @@
-1403693
+1403764

Modified: websites/staging/directory/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.html (original)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.html Tue Oct 30 16:17:04 2012
@@ -170,35 +170,35 @@
 <h2 id="adding-a-partition-programmatically">Adding a partition programmatically</h2>
 <p>The same o=sevenseas partition can be created through the application code using the Partition and DirectoryService API</p>
 <p>Here is the sample code to create a new partition o=sevenseas and its context entry programmatically</p>
-<div class="codehilite"><pre><span class="sr">//</span> <span class="n">Get</span> <span class="n">the</span> <span class="n">SchemaManager</span><span class="p">,</span> <span class="n">we</span> <span class="n">need</span> <span class="n">it</span> <span class="k">for</span> <span class="n">this</span> <span class="n">addition</span>
-<span class="n">SchemaManager</span> <span class="n">schemaManager</span> <span class="o">=</span> <span class="n">directoryService</span><span class="o">.</span><span class="n">getSchemaManager</span><span class="p">();</span>
+<div class="codehilite"><pre><span class="c1">// Get the SchemaManager, we need it for this addition</span>
+<span class="n">SchemaManager</span> <span class="n">schemaManager</span> <span class="o">=</span> <span class="n">directoryService</span><span class="o">.</span><span class="na">getSchemaManager</span><span class="o">();</span>
 
-<span class="sr">//</span> <span class="n">Create</span> <span class="n">the</span> <span class="n">partition</span>
-<span class="n">JdbmPartition</span> <span class="n">sevenseasPartition</span> <span class="o">=</span> <span class="k">new</span> <span class="n">JdbmPartition</span><span class="p">(</span> <span class="n">schemaManager</span> <span class="p">);</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">setId</span><span class="p">(</span><span class="s">&quot;sevenseas&quot;</span><span class="p">);</span>
-<span class="n">Dn</span> <span class="n">suffixDn</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Dn</span><span class="p">(</span> <span class="n">schemaManager</span><span class="p">,</span> <span class="s">&quot;o=sevenseas&quot;</span> <span class="p">);</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">setSuffix</span><span class="p">(</span> <span class="n">suffixDn</span> <span class="p">);</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">setCacheSize</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">init</span><span class="p">(</span><span class="n">directoryService</span><span class="p">);</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">setPartitionPath</span><span class="p">(</span> <span class="o">&lt;</span><span class="n">a</span> <span class="n">path</span> <span class="n">on</span> <span class="n">your</span> <span class="n">disk</span><span class="o">&gt;</span> <span class="p">);</span>
-
-<span class="sr">//</span> <span class="n">Create</span> <span class="n">some</span> <span class="n">indices</span> <span class="p">(</span><span class="n">optional</span><span class="p">)</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">addindex</span><span class="p">(</span> <span class="k">new</span> <span class="n">JdbmIndex</span><span class="p">(</span> <span class="s">&quot;objectClass&quot;</span><span class="p">,</span> <span class="n">false</span> <span class="p">)</span> <span class="p">);</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">addindex</span><span class="p">(</span> <span class="k">new</span> <span class="n">JdbmIndex</span><span class="p">(</span> <span class="s">&quot;o&quot;</span><span class="p">,</span> <span class="n">false</span> <span class="p">)</span> <span class="p">);</span>
-
-<span class="sr">//</span> <span class="n">Initialize</span> <span class="n">the</span> <span class="n">partition</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">initialize</span><span class="p">();</span>
-
-<span class="sr">//</span> <span class="n">create</span> <span class="n">the</span> <span class="n">context</span> <span class="n">entry</span>
-<span class="n">Entry</span> <span class="n">contextEntry</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DefaultEntry</span><span class="p">(</span> <span class="n">schemaManager</span><span class="p">,</span> <span class="s">&quot;o=sevenseas&quot;</span><span class="p">,</span>
-    <span class="s">&quot;objectClass: top&quot;</span><span class="p">,</span> 
-    <span class="s">&quot;objectClass: organization&quot;</span><span class="p">,</span>
-    <span class="s">&quot;o: sevenseas&quot;</span> <span class="p">);</span>
+<span class="c1">// Create the partition</span>
+<span class="n">JdbmPartition</span> <span class="n">sevenseasPartition</span> <span class="o">=</span> <span class="k">new</span> <span class="n">JdbmPartition</span><span class="o">(</span> <span class="n">schemaManager</span> <span class="o">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">setId</span><span class="o">(</span><span class="s">&quot;sevenseas&quot;</span><span class="o">);</span>
+<span class="n">Dn</span> <span class="n">suffixDn</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Dn</span><span class="o">(</span> <span class="n">schemaManager</span><span class="o">,</span> <span class="s">&quot;o=sevenseas&quot;</span> <span class="o">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">setSuffix</span><span class="o">(</span> <span class="n">suffixDn</span> <span class="o">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">setCacheSize</span><span class="o">(</span><span class="mi">1000</span><span class="o">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">init</span><span class="o">(</span><span class="n">directoryService</span><span class="o">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">setPartitionPath</span><span class="o">(</span> <span class="o">&lt;</span><span class="n">a</span> <span class="n">path</span> <span class="n">on</span> <span class="n">your</span> <span class="n">disk</span><span class="o">&gt;</span> <span class="o">);</span>
+
+<span class="c1">// Create some indices (optional)</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">addindex</span><span class="o">(</span> <span class="k">new</span> <span class="n">JdbmIndex</span><span class="o">(</span> <span class="s">&quot;objectClass&quot;</span><span class="o">,</span> <span class="kc">false</span> <span class="o">)</span> <span class="o">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">addindex</span><span class="o">(</span> <span class="k">new</span> <span class="n">JdbmIndex</span><span class="o">(</span> <span class="s">&quot;o&quot;</span><span class="o">,</span> <span class="kc">false</span> <span class="o">)</span> <span class="o">);</span>
+
+<span class="c1">// Initialize the partition</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">initialize</span><span class="o">();</span>
+
+<span class="c1">// create the context entry</span>
+<span class="n">Entry</span> <span class="n">contextEntry</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DefaultEntry</span><span class="o">(</span> <span class="n">schemaManager</span><span class="o">,</span> <span class="s">&quot;o=sevenseas&quot;</span><span class="o">,</span>
+    <span class="s">&quot;objectClass: top&quot;</span><span class="o">,</span> 
+    <span class="s">&quot;objectClass: organization&quot;</span><span class="o">,</span>
+    <span class="s">&quot;o: sevenseas&quot;</span> <span class="o">);</span>
 
-<span class="sr">//</span> <span class="n">add</span> <span class="n">the</span> <span class="n">context</span> <span class="n">entry</span>
-<span class="n">sevenseasPartition</span><span class="o">.</span><span class="n">add</span><span class="p">(</span> <span class="k">new</span> <span class="n">AddOperationContext</span><span class="p">(</span> <span class="n">null</span><span class="p">,</span> <span class="n">entry</span> <span class="p">)</span> <span class="p">);</span>
+<span class="c1">// add the context entry</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span class="na">add</span><span class="o">(</span> <span class="k">new</span> <span class="n">AddOperationContext</span><span class="o">(</span> <span class="kc">null</span><span class="o">,</span> <span class="n">entry</span> <span class="o">)</span> <span class="o">);</span>
 
-<span class="sr">//</span> <span class="n">We</span> <span class="n">are</span> <span class="n">done</span> <span class="o">!</span>
+<span class="c1">// We are done !</span>
 </pre></div>
 
 

Modified: websites/staging/directory/trunk/content/apacheds/basic-ug/2.1-data-modification.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/2.1-data-modification.html (original)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/2.1-data-modification.html Tue Oct 30 16:17:04 2012
@@ -126,13 +126,18 @@
 
 
 <h1 id="21-data-modification">2.1 - Data modification</h1>
-<p>TODO</p>
+<p>We will first expose the way you inject entries in <em>Apache Directory Server</em>. There are four type of operations you can use for that :
+<em> Addition
+</em> Deletion
+<em> Modification
+</em> Move and/or rename</p>
+<p>(The last operation allows a user to move, rename or move and rename entries).</p>
+<p>We will show how to add or delete entries in the following chapters, just to show you how it works with <em>Apache Directory Server</em>. There is nothing really different with any other servers.</p>
+<p>For further information about data modifications, you should either check the <a href="../../api/index.html">Apache LDAP API documentation</a> documentation, or the <a href="../../studio/users-guide.html">Apache Directory Studio documentation</a>.</p>
 <h2 id="table-of-content">Table of content</h2>
 <ul>
 <li><a href="2.1.1-adding-entries.html">2.1.1 - Adding Entries</a></li>
 <li><a href="2.1.2-deleting-entries.html">2.1.2 - Deleting Entries</a></li>
-<li><a href="2.1.3-modifying-entries.html">2.1.3 - Modifying Entries</a></li>
-<li><a href="2.1.4-moving-entries.html">2.1.4 - Moving Entries</a></li>
 </ul>
 
 

Modified: websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.1-adding-entries.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.1-adding-entries.html (original)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.1-adding-entries.html Tue Oct 30 16:17:04 2012
@@ -126,7 +126,80 @@
 
 
 <h1 id="211-adding-entries">2.1.1 - Adding Entries</h1>
-<p>TODO</p>
+<p>We will see how to add new entries into the server. Assuming that we have already created a partition (see <a href="1.4.3-adding-partition.html">Adding a partition</a>), we will use this added partition as a root for the entry addition. We will also create the <em>ou=people</em> entry.</p>
+<p>We try to add a new user to the "Seven Seas" partition. The data for the entry is inspired by "Peter Pan" and provided by this LDIF file (<a href="resources/captain-hook-hierarchy.ldif">Captain hook</a>): </p>
+<div class="codehilite"><pre><span class="c1"># File captain_hook.ldif</span>
+<span class="n">dn:</span> <span class="n">ou</span><span class="o">=</span><span class="n">people</span><span class="p">,</span><span class="n">o</span><span class="o">=</span><span class="n">sevenSeas</span>
+<span class="n">objectclass:</span> <span class="n">organizationalUnit</span>
+<span class="n">objectclass:</span> <span class="n">top</span>
+<span class="n">ou:</span> <span class="n">people</span>
+
+<span class="n">dn:</span> <span class="n">cn</span><span class="o">=</span><span class="n">James</span> <span class="n">Hook</span><span class="p">,</span><span class="n">ou</span><span class="o">=</span><span class="n">people</span><span class="p">,</span><span class="n">o</span><span class="o">=</span><span class="n">sevenSeas</span>
+<span class="n">objectclass:</span> <span class="n">inetOrgPerson</span>
+<span class="n">objectclass:</span> <span class="n">organizationalPerson</span>
+<span class="n">objectclass:</span> <span class="n">person</span>
+<span class="n">objectclass:</span> <span class="n">top</span>
+<span class="n">cn:</span> <span class="n">James</span> <span class="n">Hook</span>
+<span class="n">description:</span> <span class="n">A</span> <span class="n">pirate</span> <span class="n">captain</span> <span class="ow">and</span> <span class="n">Peter</span> <span class="n">Pan</span><span class="err">&#39;</span><span class="n">s</span> <span class="n">nemesis</span>
+<span class="n">sn:</span> <span class="n">Hook</span>
+<span class="n">mail:</span> <span class="n">jhook</span><span class="nv">@neverland</span>
+<span class="n">userpassword:</span> <span class="n">peterPan</span>
+</pre></div>
+
+
+<p>The first entry creates the <em>ou=people</em> container, which is necessary otherwise we can't inject the second entry.</p>
+<h2 id="using-the-command-line">Using the command line</h2>
+<p>You have to use an authorized user to inject the entry, here, <em>cn=Horatio Nelson,ou=people,o=sevenSeas</em> :</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">ldapmodify</span> <span class="o">-</span><span class="n">h</span> <span class="n">zanzibar</span> <span class="o">-</span><span class="n">p</span> <span class="mi">10389</span> <span class="o">-</span><span class="n">D</span> <span class="s">&quot;cn=Horatio Nelson,ou=people,o=sevenSeas&quot;</span> <span class="o">-</span><span class="n">w</span> <span class="n">pass</span> <span class="o">\\</span>
+    <span class="o">-</span><span class="n">a</span> <span class="o">-</span><span class="n">f</span> <span class="n">captain_hook</span><span class="o">.</span><span class="n">ldif</span>
+<span class="n">adding</span> <span class="k">new</span> <span class="n">entry</span> <span class="n">cn</span><span class="o">=</span><span class="n">James</span> <span class="n">Hook</span><span class="p">,</span><span class="n">ou</span><span class="o">=</span><span class="n">people</span><span class="p">,</span><span class="n">o</span><span class="o">=</span><span class="n">sevenSeas</span>
+<span class="nv">$</span>
+</pre></div>
+
+
+<p>Afterwards a new entry is successfully created within the "Seven Seas" partition by user "Horatio Nelson". The '+' sign in the attributes list of the <em>ldapsearch</em> command causes ApacheDS to return the operational attributes, which demonstrate this.</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">ldapsearch</span> <span class="o">-</span><span class="n">h</span> <span class="n">zanzibar</span> <span class="o">-</span><span class="n">p</span> <span class="mi">10389</span> <span class="o">-</span><span class="n">b</span> <span class="s">&quot;o=sevenSeas&quot;</span> <span class="o">-</span><span class="n">s</span> <span class="k">sub </span><span class="err">&quot;(</span><span class="nf">cn</span><span class="err">=</span><span class="nf">James</span> <span class="nf">Hook</span><span class="err">)&quot;</span> <span class="err">+</span>
+<span class="nf">version</span><span class="err">:</span> <span class="err">1</span>
+<span class="nf">dn</span><span class="err">:</span> <span class="nf">cn</span><span class="err">=</span><span class="nf">James</span> <span class="nf">Hook</span><span class="err">,</span><span class="nf">ou</span><span class="err">=</span><span class="nf">people</span><span class="err">,</span><span class="nf">o</span><span class="err">=</span><span class="nf">sevenSeas</span>
+<span class="nf">accessControlSubentries</span><span class="err">:</span> <span class="nf">cn</span><span class="err">=</span><span class="nf">sevenSeasAuthorizationRequirementsACISubentry</span><span class="err">,</span><span class="nf">o</span><span class="err">=</span><span class="nf">sevenSeas</span>
+<span class="nf">creatorsName</span><span class="err">:</span> <span class="nf">cn</span><span class="err">=</span><span class="nf">Horatio</span> <span class="nf">Nelson</span><span class="err">,</span><span class="nf">ou</span><span class="err">=</span><span class="nf">people</span><span class="err">,</span><span class="nf">o</span><span class="err">=</span><span class="nf">sevenSeas</span>
+<span class="nf">createTimestamp</span><span class="err">:</span> <span class="err">20061203140109</span><span class="nf">Z</span>
+</pre></div>
+
+
+<h2 id="using-apache-directory-studio">Using Apache Directory Studio</h2>
+<p>Once connected on the server with studio, you should be able to inject new entries -assuming you have the sufficent priviledge - :</p>
+<p><img alt="Import entry with studio" src="images/import-entry-studio.png" /></p>
+<p>Then select the LDIF file containing the entry :</p>
+<p><img alt="LDIF import" src="ldif-import-file-select.png" /></p>
+<p>When imported, the <em>log</em> windows should contain this message :</p>
+<div class="codehilite"><pre><span class="c1">#!RESULT OK</span>
+<span class="c1">#!CONNECTION ldap://localhost:10389</span>
+<span class="c1">#!DATE 2012-10-30T14:36:21.294</span>
+<span class="n">dn:</span> <span class="n">ou</span><span class="o">=</span><span class="n">people</span><span class="p">,</span><span class="n">o</span><span class="o">=</span><span class="n">sevenSeas</span>
+<span class="n">changetype:</span> <span class="n">add</span>
+<span class="n">ou:</span> <span class="n">people</span>
+<span class="n">objectclass:</span> <span class="n">organizationalUnit</span>
+<span class="n">objectclass:</span> <span class="n">top</span>
+
+<span class="c1">#! RESULT OK</span>
+<span class="c1">#! CONNECTION ldap://localhost:10389</span>
+<span class="c1">#! DATE 2012-10-30T14:36:21.320</span>
+<span class="n">dn:</span> <span class="n">cn</span><span class="o">=</span><span class="n">James</span> <span class="n">Hook</span><span class="p">,</span><span class="n">ou</span><span class="o">=</span><span class="n">people</span><span class="p">,</span><span class="n">o</span><span class="o">=</span><span class="n">sevenSeas</span>
+<span class="n">changetype:</span> <span class="n">add</span>
+<span class="n">mail:</span> <span class="n">jhook</span><span class="nv">@neverland</span>
+<span class="n">userpassword:</span> <span class="n">peterPan</span>
+<span class="n">description:</span> <span class="n">A</span> <span class="n">pirate</span> <span class="n">captain</span> <span class="ow">and</span> <span class="n">Peter</span> <span class="n">Pan</span><span class="err">&#39;</span><span class="n">s</span> <span class="n">nemesis</span>
+<span class="n">objectclass:</span> <span class="n">inetOrgPerson</span>
+<span class="n">objectclass:</span> <span class="n">organizationalPerson</span>
+<span class="n">objectclass:</span> <span class="n">person</span>
+<span class="n">objectclass:</span> <span class="n">top</span>
+<span class="n">sn:</span> <span class="n">Hook</span>
+<span class="n">cn:</span> <span class="n">James</span> <span class="n">Hook</span>
+</pre></div>
+
+
+<p>This is it for this basic introduction on how to add entries in the server. There are other ways, like using and LDAP API, to do the same thing.</p>
 
 
     <div class="nav">

Modified: websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.2-deleting-entries.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.2-deleting-entries.html (original)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/2.1.2-deleting-entries.html Tue Oct 30 16:17:04 2012
@@ -118,7 +118,7 @@
         </div>
         <div class="nav_next">
         
-            <a href="2.1.3-modifying-entries.html">2.1.3 - Modifying Entries</a>
+            <a href="2.2-searching-data.html">2.2 - Searching Data</a>
 		
         </div>
         <div class="clearfix"></div>
@@ -126,7 +126,41 @@
 
 
 <h1 id="212-deleting-entries">2.1.2 - Deleting Entries</h1>
-<p>TODO</p>
+<p>Deleting entries is quite simple : you just need to provide their <em>DN</em>, and require for the deletion of the associated entry. Although there are a few conditions that must be fulfilled for this operatio to be successful :
+<em> The entry must exist;
+</em> It should not have any children;
+* The user requiring the deletion must have enough priviledge to do so</p>
+<p>Assuming those three conditions being fulfilled, you can proceed with the deletion. We will show how it works on the entry we added in the previous chapter.</p>
+<h2 id="using-the-command-line">Using the command line</h2>
+<p>You have to use an authorized user to delete the entry, here, <em>cn=Horatio Nelson,ou=people,o=sevenSeas</em> :</p>
+<p>With an LDIF file (<a href="resources/captain-hook-delete.ldif">Captain hook delete</a>) with an appropriate change entry, this can easily be accomplished, if the bind user is allowed to do so. Here is the content of this <em>LDIF</em> file :</p>
+<div class="codehilite"><pre><span class="c1"># File captain_hook_delete.ldif</span>
+<span class="n">dn:</span> <span class="n">cn</span><span class="o">=</span><span class="n">James</span> <span class="n">Hook</span><span class="p">,</span><span class="n">ou</span><span class="o">=</span><span class="n">people</span><span class="p">,</span><span class="n">o</span><span class="o">=</span><span class="n">sevenSeas</span>
+<span class="n">changetype:</span> <span class="nb">delete</span>
+</pre></div>
+
+
+<p>and here is the command line to use :</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">ldapdel</span> <span class="o">-</span><span class="n">h</span> <span class="n">zanzibar</span> <span class="o">-</span><span class="n">p</span> <span class="mi">10389</span> <span class="o">-</span><span class="n">D</span> <span class="s">&quot;cn=Horatio Nelson,ou=people,o=sevenSeas&quot;</span> <span class="o">-</span><span class="n">w</span> <span class="n">pass</span> <span class="o">\\</span>
+    <span class="o">-</span><span class="n">a</span> <span class="o">-</span><span class="n">f</span> <span class="n">captain_hook</span><span class="o">.</span><span class="n">ldif</span>
+<span class="n">adding</span> <span class="k">new</span> <span class="n">entry</span> <span class="n">cn</span><span class="o">=</span><span class="n">James</span> <span class="n">Hook</span><span class="p">,</span><span class="n">ou</span><span class="o">=</span><span class="n">people</span><span class="p">,</span><span class="n">o</span><span class="o">=</span><span class="n">sevenSeas</span>
+<span class="nv">$</span>
+</pre></div>
+
+
+<h2 id="using-apache-directory-studio">Using Apache Directory Studio</h2>
+<p>With studio, just select the entry you want to delete, and select the "Delete" menu :</p>
+<p><img alt="Delete entry with studio" src="images/delete-entry.png" /></p>
+<p>When deleteed, the <em>log</em> windows should contain this message :</p>
+<div class="codehilite"><pre><span class="c1">#!RESULT OK</span>
+<span class="c1">#!CONNECTION ldap://localhost:10389</span>
+<span class="c1">#!DATE 2012-10-30T14:57:47.399</span>
+<span class="n">dn:</span> <span class="n">cn</span><span class="o">=</span><span class="n">James</span> <span class="n">Hook</span><span class="p">,</span><span class="n">ou</span><span class="o">=</span><span class="n">people</span><span class="p">,</span><span class="n">o</span><span class="o">=</span><span class="n">SevenSeans</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">com</span>
+<span class="n">changetype:</span> <span class="nb">delete</span>
+</pre></div>
+
+
+<p>Studio allows you to delete entries which have children, but it will first try to delete all the children recursively. There is no such things when you send an LDAP <em>DeleteRequest</em>.</p>
 
 
     <div class="nav">
@@ -142,7 +176,7 @@
         </div>
         <div class="nav_next">
         
-            <a href="2.1.3-modifying-entries.html">2.1.3 - Modifying Entries</a>
+            <a href="2.2-searching-data.html">2.2 - Searching Data</a>
 		
         </div>
         <div class="clearfix"></div>

Modified: websites/staging/directory/trunk/content/apacheds/basic-ug/3.1-authentication-options.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/3.1-authentication-options.html (original)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/3.1-authentication-options.html Tue Oct 30 16:17:04 2012
@@ -205,45 +205,45 @@
 
 <h3 id="binds-from-java-components-using-jndi">Binds from Java components using JNDI</h3>
 <p>Using JNDI, authentication via simple binds is accomplished by appropriate configuration. One option is to provide the parameters in a Hashtable object like this</p>
-<div class="codehilite"><pre><span class="nb">import</span> <span class="n">java</span><span class="o">.</span><span class="n">util</span><span class="o">.</span><span class="n">Hashtable</span><span class="p">;</span>
+<div class="codehilite"><pre><span class="kn">import</span> <span class="nn">java.util.Hashtable</span><span class="o">;</span>
 
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">Context</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">InitialContext</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">NamingEnumeration</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">NamingException</span><span class="p">;</span>
-
-<span class="n">public</span> <span class="n">class</span> <span class="n">SimpleBindDemo</span> <span class="p">{</span>
-
-    <span class="n">public</span> <span class="n">static</span> <span class="n">void</span> <span class="n">main</span><span class="p">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="p">)</span> <span class="n">throws</span> <span class="n">NamingException</span> <span class="p">{</span>
-
-        <span class="k">if</span> <span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="nb">length</span> <span class="o">&lt;</span> <span class="mi">2</span><span class="p">)</span> <span class="p">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="n">err</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Usage: java SimpleBindDemo &lt;userDN&gt; &lt;password&gt;&quot;</span><span class="p">);</span>
-            <span class="n">System</span><span class="o">.</span><span class="nb">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
-        <span class="p">}</span>
-
-        <span class="n">Hashtable</span> <span class="n">env</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Hashtable</span><span class="p">();</span>
-        <span class="n">env</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">INITIAL_CONTEXT_FACTORY</span><span class="p">,</span> <span class="s">&quot;com.sun.jndi.ldap.LdapCtxFactory&quot;</span><span class="p">);</span>
-        <span class="n">env</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">PROVIDER_URL</span><span class="p">,</span> <span class="s">&quot;ldap://zanzibar:10389/o=sevenSeas&quot;</span><span class="p">);</span>
-
-        <span class="n">env</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">SECURITY_AUTHENTICATION</span><span class="p">,</span> <span class="s">&quot;simple&quot;</span><span class="p">);</span>
-        <span class="n">env</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">SECURITY_PRINCIPAL</span><span class="p">,</span> <span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span>
-        <span class="n">env</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">SECURITY_CREDENTIALS</span><span class="p">,</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span>
-
-        <span class="n">try</span> <span class="p">{</span>
-            <span class="n">Context</span> <span class="n">ctx</span> <span class="o">=</span> <span class="k">new</span> <span class="n">InitialContext</span><span class="p">(</span><span class="n">env</span><span class="p">);</span>
-            <span class="n">NamingEnumeration</span> <span class="n">enm</span> <span class="o">=</span> <span class="n">ctx</span><span class="o">.</span><span class="n">list</span><span class="p">(</span><span class="s">&quot;&quot;</span><span class="p">);</span>
-
-            <span class="k">while</span> <span class="p">(</span><span class="n">enm</span><span class="o">.</span><span class="n">hasMore</span><span class="p">())</span> <span class="p">{</span>
-                <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="n">enm</span><span class="o">.</span><span class="k">next</span><span class="p">());</span>
-            <span class="p">}</span>
-
-            <span class="n">enm</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
-            <span class="n">ctx</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
-        <span class="p">}</span> <span class="n">catch</span> <span class="p">(</span><span class="n">NamingException</span> <span class="n">e</span><span class="p">)</span> <span class="p">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">getMessage</span><span class="p">());</span>
-        <span class="p">}</span>
-    <span class="p">}</span>
-<span class="p">}</span>
+<span class="kn">import</span> <span class="nn">javax.naming.Context</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.InitialContext</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.NamingEnumeration</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.NamingException</span><span class="o">;</span>
+
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">SimpleBindDemo</span> <span class="o">{</span>
+
+    <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">NamingException</span> <span class="o">{</span>
+
+        <span class="k">if</span> <span class="o">(</span><span class="n">args</span><span class="o">.</span><span class="na">length</span> <span class="o">&lt;</span> <span class="mi">2</span><span class="o">)</span> <span class="o">{</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">err</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Usage: java SimpleBindDemo &lt;userDN&gt; &lt;password&gt;&quot;</span><span class="o">);</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">exit</span><span class="o">(</span><span class="mi">1</span><span class="o">);</span>
+        <span class="o">}</span>
+
+        <span class="n">Hashtable</span> <span class="n">env</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Hashtable</span><span class="o">();</span>
+        <span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">INITIAL_CONTEXT_FACTORY</span><span class="o">,</span> <span class="s">&quot;com.sun.jndi.ldap.LdapCtxFactory&quot;</span><span class="o">);</span>
+        <span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">PROVIDER_URL</span><span class="o">,</span> <span class="s">&quot;ldap://zanzibar:10389/o=sevenSeas&quot;</span><span class="o">);</span>
+
+        <span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_AUTHENTICATION</span><span class="o">,</span> <span class="s">&quot;simple&quot;</span><span class="o">);</span>
+        <span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_PRINCIPAL</span><span class="o">,</span> <span class="n">args</span><span class="o">[</span><span class="mi">0</span><span class="o">]);</span>
+        <span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_CREDENTIALS</span><span class="o">,</span> <span class="n">args</span><span class="o">[</span><span class="mi">1</span><span class="o">]);</span>
+
+        <span class="k">try</span> <span class="o">{</span>
+            <span class="n">Context</span> <span class="n">ctx</span> <span class="o">=</span> <span class="k">new</span> <span class="n">InitialContext</span><span class="o">(</span><span class="n">env</span><span class="o">);</span>
+            <span class="n">NamingEnumeration</span> <span class="n">enm</span> <span class="o">=</span> <span class="n">ctx</span><span class="o">.</span><span class="na">list</span><span class="o">(</span><span class="s">&quot;&quot;</span><span class="o">);</span>
+
+            <span class="k">while</span> <span class="o">(</span><span class="n">enm</span><span class="o">.</span><span class="na">hasMore</span><span class="o">())</span> <span class="o">{</span>
+                <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">enm</span><span class="o">.</span><span class="na">next</span><span class="o">());</span>
+            <span class="o">}</span>
+
+            <span class="n">enm</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+            <span class="n">ctx</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+        <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">NamingException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">e</span><span class="o">.</span><span class="na">getMessage</span><span class="o">());</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
 </pre></div>
 
 
@@ -282,26 +282,26 @@ Not only the administrator will be able 
 </p>
 <h3 id="but-how-to-obtain-the-hash-value-for-a-password">But how to obtain the hash value for a password?</h3>
 <p>With some lines of code, it is quite easy to accomplish this task programatically in Java:</p>
-<div class="codehilite"><pre><span class="nb">import</span> <span class="n">java</span><span class="o">.</span><span class="n">security</span><span class="o">.</span><span class="n">MessageDigest</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">java</span><span class="o">.</span><span class="n">security</span><span class="o">.</span><span class="n">NoSuchAlgorithmException</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">sun</span><span class="o">.</span><span class="n">misc</span><span class="o">.</span><span class="n">BASE64Encoder</span><span class="p">;</span>
-
-<span class="n">public</span> <span class="n">class</span> <span class="n">DigestDemo</span> <span class="p">{</span>
-    <span class="n">public</span> <span class="n">static</span> <span class="n">void</span> <span class="n">main</span><span class="p">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="p">)</span> <span class="n">throws</span> <span class="n">NoSuchAlgorithmException</span> <span class="p">{</span>
-        <span class="n">String</span> <span class="n">password</span> <span class="o">=</span> <span class="s">&quot;pass&quot;</span><span class="p">;</span>
-        <span class="n">String</span> <span class="n">algorithm</span> <span class="o">=</span> <span class="s">&quot;SHA&quot;</span><span class="p">;</span>
-
-        <span class="sr">//</span> <span class="n">Calculate</span> <span class="n">hash</span> <span class="n">value</span>
-        <span class="n">MessageDigest</span> <span class="n">md</span> <span class="o">=</span> <span class="n">MessageDigest</span><span class="o">.</span><span class="n">getInstance</span><span class="p">(</span><span class="n">algorithm</span><span class="p">);</span>
-        <span class="n">md</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">password</span><span class="o">.</span><span class="n">getBytes</span><span class="p">());</span>
-        <span class="n">byte</span><span class="o">[]</span> <span class="n">bytes</span> <span class="o">=</span> <span class="n">md</span><span class="o">.</span><span class="n">digest</span><span class="p">();</span>
-
-        <span class="sr">//</span> <span class="n">Print</span> <span class="n">out</span> <span class="n">value</span> <span class="n">in</span> <span class="n">Base64</span> <span class="n">encoding</span>
-        <span class="n">BASE64Encoder</span> <span class="n">base64encoder</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BASE64Encoder</span><span class="p">();</span>
-        <span class="n">String</span> <span class="n">hash</span> <span class="o">=</span> <span class="n">base64encoder</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">bytes</span><span class="p">);</span>        
-        <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&#39;{&#39;</span><span class="o">+</span><span class="n">algorithm</span><span class="o">+</span><span class="s">&#39;}&#39;</span><span class="o">+</span><span class="n">hash</span><span class="p">);</span>
-    <span class="p">}</span>
-<span class="p">}</span>
+<div class="codehilite"><pre><span class="kn">import</span> <span class="nn">java.security.MessageDigest</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.security.NoSuchAlgorithmException</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">sun.misc.BASE64Encoder</span><span class="o">;</span>
+
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">DigestDemo</span> <span class="o">{</span>
+    <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">NoSuchAlgorithmException</span> <span class="o">{</span>
+        <span class="n">String</span> <span class="n">password</span> <span class="o">=</span> <span class="s">&quot;pass&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">algorithm</span> <span class="o">=</span> <span class="s">&quot;SHA&quot;</span><span class="o">;</span>
+
+        <span class="c1">// Calculate hash value</span>
+        <span class="n">MessageDigest</span> <span class="n">md</span> <span class="o">=</span> <span class="n">MessageDigest</span><span class="o">.</span><span class="na">getInstance</span><span class="o">(</span><span class="n">algorithm</span><span class="o">);</span>
+        <span class="n">md</span><span class="o">.</span><span class="na">update</span><span class="o">(</span><span class="n">password</span><span class="o">.</span><span class="na">getBytes</span><span class="o">());</span>
+        <span class="kt">byte</span><span class="o">[]</span> <span class="n">bytes</span> <span class="o">=</span> <span class="n">md</span><span class="o">.</span><span class="na">digest</span><span class="o">();</span>
+
+        <span class="c1">// Print out value in Base64 encoding</span>
+        <span class="n">BASE64Encoder</span> <span class="n">base64encoder</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BASE64Encoder</span><span class="o">();</span>
+        <span class="n">String</span> <span class="n">hash</span> <span class="o">=</span> <span class="n">base64encoder</span><span class="o">.</span><span class="na">encode</span><span class="o">(</span><span class="n">bytes</span><span class="o">);</span>        
+        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="sc">&#39;{&#39;</span><span class="o">+</span><span class="n">algorithm</span><span class="o">+</span><span class="sc">&#39;}&#39;</span><span class="o">+</span><span class="n">hash</span><span class="o">);</span>
+    <span class="o">}</span>
+<span class="o">}</span>
 </pre></div>
 
 
@@ -411,76 +411,76 @@ Not only the administrator will be able 
 <h3 id="sample-code-with-jndi">Sample code with JNDI</h3>
 <p>The algorithm described above is implemented by many software solutions which are able to integrate LDAP directories. You will learn more about some of them and their configuration options within a later section of this guide.</p>
 <p>For illustration purposes, here is a simple Java program which performs the steps with the help of JNDI. It uses anonymous bind for the first step, hence it must be enabled (replace with a technical user, if it better meets your requirements). </p>
-<div class="codehilite"><pre><span class="nb">import</span> <span class="n">java</span><span class="o">.</span><span class="n">util</span><span class="o">.</span><span class="n">Hashtable</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">Context</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">NamingEnumeration</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">NamingException</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">directory</span><span class="o">.</span><span class="n">DirContext</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">directory</span><span class="o">.</span><span class="n">InitialDirContext</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">directory</span><span class="o">.</span><span class="n">SearchControls</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">javax</span><span class="o">.</span><span class="n">naming</span><span class="o">.</span><span class="n">directory</span><span class="o">.</span><span class="n">SearchResult</span><span class="p">;</span>
-
-<span class="n">public</span> <span class="n">class</span> <span class="n">AdvancedBindDemo</span> <span class="p">{</span>
-
-    <span class="n">public</span> <span class="n">static</span> <span class="n">void</span> <span class="n">main</span><span class="p">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="p">)</span> <span class="n">throws</span> <span class="n">NamingException</span> <span class="p">{</span>
-
-        <span class="k">if</span> <span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="nb">length</span> <span class="o">&lt;</span> <span class="mi">2</span><span class="p">)</span> <span class="p">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="n">err</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Usage: java AdvancedBindDemo &lt;uid&gt; &lt;password&gt;&quot;</span><span class="p">);</span>
-            <span class="n">System</span><span class="o">.</span><span class="nb">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
-        <span class="p">}</span>
-
-        <span class="n">Hashtable</span> <span class="n">env</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Hashtable</span><span class="p">();</span>
-        <span class="n">env</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">INITIAL_CONTEXT_FACTORY</span><span class="p">,</span> <span class="s">&quot;com.sun.jndi.ldap.LdapCtxFactory&quot;</span><span class="p">);</span>
-        <span class="n">env</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">PROVIDER_URL</span><span class="p">,</span> <span class="s">&quot;ldap://zanzibar:10389/&quot;</span><span class="p">);</span>
-        <span class="n">env</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">SECURITY_AUTHENTICATION</span><span class="p">,</span> <span class="s">&quot;simple&quot;</span><span class="p">);</span>
-
-        <span class="n">String</span> <span class="n">uid</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
-        <span class="n">String</span> <span class="n">password</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">];</span>
-
-        <span class="n">DirContext</span> <span class="n">ctx</span> <span class="o">=</span> <span class="n">null</span><span class="p">;</span>
-
-        <span class="n">try</span> <span class="p">{</span>            
-            <span class="sr">//</span> <span class="n">Step</span> <span class="mi">1</span><span class="p">:</span> <span class="n">Bind</span> <span class="n">anonymously</span>            
-            <span class="n">ctx</span> <span class="o">=</span> <span class="k">new</span> <span class="n">InitialDirContext</span><span class="p">(</span><span class="n">env</span><span class="p">);</span>
-
-            <span class="sr">//</span> <span class="n">Step</span> <span class="mi">2</span><span class="p">:</span> <span class="n">Search</span> <span class="n">the</span> <span class="n">directory</span>
-            <span class="n">String</span> <span class="n">base</span> <span class="o">=</span> <span class="s">&quot;o=sevenSeas&quot;</span><span class="p">;</span>
-            <span class="n">String</span> <span class="n">filter</span> <span class="o">=</span> <span class="s">&quot;(&amp;(objectClass=inetOrgPerson)(uid={0}))&quot;</span><span class="p">;</span>           
-            <span class="n">SearchControls</span> <span class="n">ctls</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SearchControls</span><span class="p">();</span>
-            <span class="n">ctls</span><span class="o">.</span><span class="n">setSearchScope</span><span class="p">(</span><span class="n">SearchControls</span><span class="o">.</span><span class="n">SUBTREE_SCOPE</span><span class="p">);</span>
-            <span class="n">ctls</span><span class="o">.</span><span class="n">setReturningAttributes</span><span class="p">(</span><span class="k">new</span> <span class="n">String</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span>
-            <span class="n">ctls</span><span class="o">.</span><span class="n">setReturningObjFlag</span><span class="p">(</span><span class="n">true</span><span class="p">);</span>
-            <span class="n">NamingEnumeration</span> <span class="n">enm</span> <span class="o">=</span> <span class="n">ctx</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="n">base</span><span class="p">,</span> <span class="n">filter</span><span class="p">,</span> <span class="k">new</span> <span class="n">String</span><span class="o">[]</span> <span class="p">{</span> <span class="n">uid</span> <span class="p">},</span> <span class="n">ctls</span><span class="p">);</span>
-
-            <span class="n">String</span> <span class="n">dn</span> <span class="o">=</span> <span class="n">null</span><span class="p">;</span>
-
-            <span class="k">if</span> <span class="p">(</span><span class="n">enm</span><span class="o">.</span><span class="n">hasMore</span><span class="p">())</span> <span class="p">{</span>
-                <span class="n">SearchResult</span> <span class="n">result</span> <span class="o">=</span> <span class="p">(</span><span class="n">SearchResult</span><span class="p">)</span> <span class="n">enm</span><span class="o">.</span><span class="k">next</span><span class="p">();</span>
-                <span class="n">dn</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="n">getNameInNamespace</span><span class="p">();</span>
-
-                <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;dn: &quot;</span><span class="o">+</span><span class="n">dn</span><span class="p">);</span>
-            <span class="p">}</span>
-
-            <span class="k">if</span> <span class="p">(</span><span class="n">dn</span> <span class="o">==</span> <span class="n">null</span> <span class="o">||</span> <span class="n">enm</span><span class="o">.</span><span class="n">hasMore</span><span class="p">())</span> <span class="p">{</span>
-                <span class="sr">//</span> <span class="n">uid</span> <span class="ow">not</span> <span class="n">found</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">unique</span>
-                <span class="n">throw</span> <span class="k">new</span> <span class="n">NamingException</span><span class="p">(</span><span class="s">&quot;Authentication failed&quot;</span><span class="p">);</span>
-            <span class="p">}</span>
-
-            <span class="sr">//</span> <span class="n">Step</span> <span class="mi">3</span><span class="p">:</span> <span class="n">Bind</span> <span class="n">with</span> <span class="n">found</span> <span class="n">DN</span> <span class="ow">and</span> <span class="n">given</span> <span class="n">password</span>
-            <span class="n">ctx</span><span class="o">.</span><span class="n">addToEnvironment</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">SECURITY_PRINCIPAL</span><span class="p">,</span> <span class="n">dn</span><span class="p">);</span>
-            <span class="n">ctx</span><span class="o">.</span><span class="n">addToEnvironment</span><span class="p">(</span><span class="n">Context</span><span class="o">.</span><span class="n">SECURITY_CREDENTIALS</span><span class="p">,</span> <span class="n">password</span><span class="p">);</span>
-            <span class="sr">//</span> <span class="n">Perform</span> <span class="n">a</span> <span class="n">lookup</span> <span class="n">in</span> <span class="n">order</span> <span class="n">to</span> <span class="n">force</span> <span class="n">a</span> <span class="nb">bind</span> <span class="n">operation</span> <span class="n">with</span> <span class="n">JNDI</span>
-            <span class="n">ctx</span><span class="o">.</span><span class="n">lookup</span><span class="p">(</span><span class="n">dn</span><span class="p">);</span>
-            <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Authentication successful&quot;</span><span class="p">);</span>
-
-            <span class="n">enm</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
-        <span class="p">}</span> <span class="n">catch</span> <span class="p">(</span><span class="n">NamingException</span> <span class="n">e</span><span class="p">)</span> <span class="p">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">getMessage</span><span class="p">());</span>
-        <span class="p">}</span> <span class="n">finally</span> <span class="p">{</span>
-            <span class="n">ctx</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
-        <span class="p">}</span>
-    <span class="p">}</span>
-<span class="p">}</span>
+<div class="codehilite"><pre><span class="kn">import</span> <span class="nn">java.util.Hashtable</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.Context</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.NamingEnumeration</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.NamingException</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.directory.DirContext</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.directory.InitialDirContext</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.directory.SearchControls</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">javax.naming.directory.SearchResult</span><span class="o">;</span>
+
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">AdvancedBindDemo</span> <span class="o">{</span>
+
+    <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">NamingException</span> <span class="o">{</span>
+
+        <span class="k">if</span> <span class="o">(</span><span class="n">args</span><span class="o">.</span><span class="na">length</span> <span class="o">&lt;</span> <span class="mi">2</span><span class="o">)</span> <span class="o">{</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">err</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Usage: java AdvancedBindDemo &lt;uid&gt; &lt;password&gt;&quot;</span><span class="o">);</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">exit</span><span class="o">(</span><span class="mi">1</span><span class="o">);</span>
+        <span class="o">}</span>
+
+        <span class="n">Hashtable</span> <span class="n">env</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Hashtable</span><span class="o">();</span>
+        <span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">INITIAL_CONTEXT_FACTORY</span><span class="o">,</span> <span class="s">&quot;com.sun.jndi.ldap.LdapCtxFactory&quot;</span><span class="o">);</span>
+        <span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">PROVIDER_URL</span><span class="o">,</span> <span class="s">&quot;ldap://zanzibar:10389/&quot;</span><span class="o">);</span>
+        <span class="n">env</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_AUTHENTICATION</span><span class="o">,</span> <span class="s">&quot;simple&quot;</span><span class="o">);</span>
+
+        <span class="n">String</span> <span class="n">uid</span> <span class="o">=</span> <span class="n">args</span><span class="o">[</span><span class="mi">0</span><span class="o">];</span>
+        <span class="n">String</span> <span class="n">password</span> <span class="o">=</span> <span class="n">args</span><span class="o">[</span><span class="mi">1</span><span class="o">];</span>
+
+        <span class="n">DirContext</span> <span class="n">ctx</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+
+        <span class="k">try</span> <span class="o">{</span>            
+            <span class="c1">// Step 1: Bind anonymously            </span>
+            <span class="n">ctx</span> <span class="o">=</span> <span class="k">new</span> <span class="n">InitialDirContext</span><span class="o">(</span><span class="n">env</span><span class="o">);</span>
+
+            <span class="c1">// Step 2: Search the directory</span>
+            <span class="n">String</span> <span class="n">base</span> <span class="o">=</span> <span class="s">&quot;o=sevenSeas&quot;</span><span class="o">;</span>
+            <span class="n">String</span> <span class="n">filter</span> <span class="o">=</span> <span class="s">&quot;(&amp;(objectClass=inetOrgPerson)(uid={0}))&quot;</span><span class="o">;</span>           
+            <span class="n">SearchControls</span> <span class="n">ctls</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SearchControls</span><span class="o">();</span>
+            <span class="n">ctls</span><span class="o">.</span><span class="na">setSearchScope</span><span class="o">(</span><span class="n">SearchControls</span><span class="o">.</span><span class="na">SUBTREE_SCOPE</span><span class="o">);</span>
+            <span class="n">ctls</span><span class="o">.</span><span class="na">setReturningAttributes</span><span class="o">(</span><span class="k">new</span> <span class="n">String</span><span class="o">[</span><span class="mi">0</span><span class="o">]);</span>
+            <span class="n">ctls</span><span class="o">.</span><span class="na">setReturningObjFlag</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
+            <span class="n">NamingEnumeration</span> <span class="n">enm</span> <span class="o">=</span> <span class="n">ctx</span><span class="o">.</span><span class="na">search</span><span class="o">(</span><span class="n">base</span><span class="o">,</span> <span class="n">filter</span><span class="o">,</span> <span class="k">new</span> <span class="n">String</span><span class="o">[]</span> <span class="o">{</span> <span class="n">uid</span> <span class="o">},</span> <span class="n">ctls</span><span class="o">);</span>
+
+            <span class="n">String</span> <span class="n">dn</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+
+            <span class="k">if</span> <span class="o">(</span><span class="n">enm</span><span class="o">.</span><span class="na">hasMore</span><span class="o">())</span> <span class="o">{</span>
+                <span class="n">SearchResult</span> <span class="n">result</span> <span class="o">=</span> <span class="o">(</span><span class="n">SearchResult</span><span class="o">)</span> <span class="n">enm</span><span class="o">.</span><span class="na">next</span><span class="o">();</span>
+                <span class="n">dn</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="na">getNameInNamespace</span><span class="o">();</span>
+
+                <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;dn: &quot;</span><span class="o">+</span><span class="n">dn</span><span class="o">);</span>
+            <span class="o">}</span>
+
+            <span class="k">if</span> <span class="o">(</span><span class="n">dn</span> <span class="o">==</span> <span class="kc">null</span> <span class="o">||</span> <span class="n">enm</span><span class="o">.</span><span class="na">hasMore</span><span class="o">())</span> <span class="o">{</span>
+                <span class="c1">// uid not found or not unique</span>
+                <span class="k">throw</span> <span class="k">new</span> <span class="nf">NamingException</span><span class="o">(</span><span class="s">&quot;Authentication failed&quot;</span><span class="o">);</span>
+            <span class="o">}</span>
+
+            <span class="c1">// Step 3: Bind with found DN and given password</span>
+            <span class="n">ctx</span><span class="o">.</span><span class="na">addToEnvironment</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_PRINCIPAL</span><span class="o">,</span> <span class="n">dn</span><span class="o">);</span>
+            <span class="n">ctx</span><span class="o">.</span><span class="na">addToEnvironment</span><span class="o">(</span><span class="n">Context</span><span class="o">.</span><span class="na">SECURITY_CREDENTIALS</span><span class="o">,</span> <span class="n">password</span><span class="o">);</span>
+            <span class="c1">// Perform a lookup in order to force a bind operation with JNDI</span>
+            <span class="n">ctx</span><span class="o">.</span><span class="na">lookup</span><span class="o">(</span><span class="n">dn</span><span class="o">);</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Authentication successful&quot;</span><span class="o">);</span>
+
+            <span class="n">enm</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+        <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">NamingException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">e</span><span class="o">.</span><span class="na">getMessage</span><span class="o">());</span>
+        <span class="o">}</span> <span class="k">finally</span> <span class="o">{</span>
+            <span class="n">ctx</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
 </pre></div>
 
 

Modified: websites/staging/directory/trunk/content/apacheds/basic-ug/3.3-enabling-ssl.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/3.3-enabling-ssl.html (original)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/3.3-enabling-ssl.html Tue Oct 30 16:17:04 2012
@@ -257,8 +257,8 @@ In order to keep it simple for beginners
 <p>Another option is to use graphical tools for key creation like <a href="http://portecle.sourceforge.net/">Portecle</a>, which is basically a user-friendly front-end for keytool with comparable functionality. For a first impression see a screen shot below.</p>
 <p><img alt="Portecle Keystore" src="images/portecle-with-keystore.png" /></p>
 <h4 id="configuring-apacheds-to-use-this-external-keystore">Configuring ApacheDS to use this external keystore</h4>
-<p>Enabling SSL in Apache Directory Server and using the key pair created as above is quite easy. Simply put the keystore file in the <em>conf</em> directory of ApacheDS, and enable ldaps. </p>
-<p>TODO : Studio screen capture</p>
+<p>Enabling SSL in Apache Directory Server and using the key pair created as above is quite easy. Simply put the keystore file in the <em>conf</em> directory of ApacheDS, and enable ldaps. Then you just have to setup the configuration using <em>Apache Directory Studio</em>, feeling the required input boxes, as shown on the following picture :</p>
+<p><img alt="Keystore Configuration" src="images/keystore-configuration.png" /></p>
 <p>The following properties were used :</p>
 <div class="table-wrap">
     <table class="confluenceTable">

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/delete-entry.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/delete-entry.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/import-entry-studio.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/import-entry-studio.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/keystore-configuration.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/keystore-configuration.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/ldif-import-file-select.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/ldif-import-file-select.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/resources/captain-hook-hierarchy.ldif
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/resources/captain-hook-hierarchy.ldif (added)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/resources/captain-hook-hierarchy.ldif Tue Oct 30 16:17:04 2012
@@ -0,0 +1,15 @@
+dn: ou=people,o=sevenSeas
+objectclass: organizationalUnit
+objectclass: top
+ou: people
+
+dn: cn=James Hook,ou=people,o=sevenSeas
+objectclass: inetOrgPerson
+objectclass: organizationalPerson
+objectclass: person
+objectclass: top
+cn: James Hook
+description: A pirate captain and Peter Pan's nemesis
+sn: Hook
+mail: jhook@neverland
+userpassword: peterPan



Mime
View raw message