You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/12/10 16:44:39 UTC

svn commit: r1044406 - in /directory: apacheds/trunk/core-annotations/ apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/ a...

Author: elecharny
Date: Fri Dec 10 15:44:37 2010
New Revision: 1044406

URL: http://svn.apache.org/viewvc?rev=1044406&view=rev
Log:
Merged Antoine's branch into trunk

Added:
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java
      - copied unchanged from r1044161, directory/apacheds/branches/antoine/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java
      - copied unchanged from r1044141, directory/apacheds/branches/antoine/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AnonymousAuthenticatorBean.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticationInterceptorBean.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticatorBean.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/DelegatingAuthenticatorBean.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/SimpleAuthenticatorBean.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/StrongAuthenticatorBean.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
      - copied unchanged from r1044146, directory/apacheds/branches/antoine/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.1.2.930.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.1.2.930.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.1.2.931.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.1.2.931.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.1.2.932.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.1.2.932.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.1.2.933.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.1.2.933.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.131.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.131.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.901.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.901.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.902.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.902.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.903.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.903.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.904.ldif
      - copied, changed from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.904.ldif
    directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.905.ldif
      - copied unchanged from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.905.ldif
Modified:
    directory/apacheds/trunk/core/   (props changed)
    directory/apacheds/trunk/core-annotations/   (props changed)
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/trunk/protocol-ldap/   (props changed)
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java   (props changed)
    directory/apacheds/trunk/server-config/   (props changed)
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java   (props changed)
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java
    directory/apacheds/trunk/server-config/src/main/resources/   (props changed)
    directory/apacheds/trunk/server-config/src/main/resources/config.ldif
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java   (props changed)
    directory/apacheds/trunk/server-integ/   (props changed)
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/suites/StockServerISuite.java
    directory/apacheds/trunk/service-builder/   (props changed)
    directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java
    directory/apacheds/trunk/test-framework/   (props changed)
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
    directory/shared/trunk/ldap-schema/   (props changed)
    directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/   (props changed)
    directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java   (props changed)
    directory/shared/trunk/ldap-schema/src/main/resources/schema-all.ldif
    directory/shared/trunk/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java

Propchange: directory/apacheds/trunk/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/core:1038305-1044141
 /directory/apacheds/branches/apacheds-codec-merge/core:982369-987590
 /directory/apacheds/branches/apacheds-config/core:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core:980138-980934

Propchange: directory/apacheds/trunk/core-annotations/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/core-annotations:1038305-1044161
 /directory/apacheds/branches/apacheds-codec-merge/core-annotations:982369-987590
 /directory/apacheds/branches/apacheds-config/core-annotations:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-annotations:980138-980934

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java Fri Dec 10 15:44:37 2010
@@ -54,4 +54,7 @@ public @interface CreateDS
     
     /** additional interceptors */
     Class<?>[] additionalInterceptors() default {};
+    
+    /** authenticators, when empty the default authenticators are used, else this must contain the complete list */
+    CreateAuthenticator[] authenticators() default {};
 }

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java Fri Dec 10 15:44:37 2010
@@ -23,15 +23,21 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.lang.reflect.Method;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.annotations.ApplyLdifFiles;
 import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.annotations.ContextEntry;
+import org.apache.directory.server.core.annotations.CreateAuthenticator;
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.annotations.CreateIndex;
 import org.apache.directory.server.core.annotations.CreatePartition;
+import org.apache.directory.server.core.authn.AuthenticationInterceptor;
+import org.apache.directory.server.core.authn.Authenticator;
+import org.apache.directory.server.core.authn.DelegatingAuthenticator;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
@@ -49,7 +55,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * A Helper class used to create a DS from the annotations
- *
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class DSAnnotationProcessor
@@ -61,11 +67,13 @@ public class DSAnnotationProcessor
     /**
      * Create the DirectoryService
      */
-    private static DirectoryService createDS( CreateDS dsBuilder ) throws Exception
+    private static DirectoryService createDS( CreateDS dsBuilder )
+            throws Exception
     {
         LOG.debug( "Starting DS {}...", dsBuilder.name() );
         Class<?> factory = dsBuilder.factory();
-        DirectoryServiceFactory dsf = ( DirectoryServiceFactory ) factory.newInstance();
+        DirectoryServiceFactory dsf = ( DirectoryServiceFactory ) factory
+                .newInstance();
 
         DirectoryService service = dsf.getDirectoryService();
         service.setAccessControlEnabled( dsBuilder.enableAccessControl() );
@@ -78,6 +86,43 @@ public class DSAnnotationProcessor
             interceptorList.add( ( Interceptor ) interceptorClass.newInstance() );
         }
 
+        if ( dsBuilder.authenticators().length != 0 )
+        {
+            AuthenticationInterceptor authenticationInterceptor = null;
+            
+            for ( Interceptor interceptor : interceptorList )
+            {
+                if ( interceptor instanceof AuthenticationInterceptor )
+                {
+                    authenticationInterceptor = ( AuthenticationInterceptor ) interceptor;
+                    break;
+                }
+            }
+            
+            if ( authenticationInterceptor == null )
+            {
+                throw new IllegalStateException(
+                        "authentication interceptor not found" );
+            }
+            
+            Set<Authenticator> authenticators = new HashSet<Authenticator>();
+
+            for ( CreateAuthenticator createAuthenticator : dsBuilder
+                    .authenticators() )
+            {
+                Authenticator auth = createAuthenticator.type().newInstance();
+                
+                if ( auth instanceof DelegatingAuthenticator )
+                {
+                    DelegatingAuthenticator dauth = ( DelegatingAuthenticator ) auth;
+                    dauth.setDelegateHost( createAuthenticator.delegateHost() );
+                    dauth.setDelegatePort( createAuthenticator.delegatePort() );
+                }
+                
+                authenticators.add( auth );
+            }
+        }
+
         service.setInterceptors( interceptorList );
 
         dsf.init( dsBuilder.name() );
@@ -91,20 +136,26 @@ public class DSAnnotationProcessor
             if ( createPartition.type() == Partition.class )
             {
                 // The annotation does not specify a specific partition type.
-                // We use the partition factory to create partition and index instances.
+                // We use the partition factory to create partition and index
+                // instances.
                 PartitionFactory partitionFactory = dsf.getPartitionFactory();
-                partition = partitionFactory.createPartition( createPartition.name(), createPartition.suffix(),
-                    createPartition.cacheSize(), new File( service.getInstanceLayout().getPartitionsDirectory(), createPartition.name() ) );
+                partition = partitionFactory.createPartition( createPartition
+                        .name(), createPartition.suffix(), createPartition
+                        .cacheSize(), new File( service.getInstanceLayout()
+                        .getPartitionsDirectory(), createPartition.name() ) );
 
                 CreateIndex[] indexes = createPartition.indexes();
+                
                 for ( CreateIndex createIndex : indexes )
                 {
-                    partitionFactory.addIndex( partition, createIndex.attribute(), createIndex.cacheSize() );
+                    partitionFactory.addIndex( partition,
+                            createIndex.attribute(), createIndex.cacheSize() );
                 }
             }
             else
             {
-                // The annotation contains a specific partition type, we use that type.
+                // The annotation contains a specific partition type, we use
+                // that type.
                 partition = createPartition.type().newInstance();
                 partition.setId( createPartition.name() );
                 partition.setSuffix( new DN( createPartition.suffix() ) );
@@ -113,18 +164,21 @@ public class DSAnnotationProcessor
                 {
                     BTreePartition<?> btreePartition = ( BTreePartition<?> ) partition;
                     btreePartition.setCacheSize( createPartition.cacheSize() );
-                    btreePartition.setPartitionDir( new File( service.getInstanceLayout().getPartitionsDirectory(), createPartition.name() ) );
+                    btreePartition.setPartitionDir( new File( service
+                            .getInstanceLayout().getPartitionsDirectory(),
+                            createPartition.name() ) );
 
                     // Process the indexes if any
                     CreateIndex[] indexes = createPartition.indexes();
 
                     for ( CreateIndex createIndex : indexes )
                     {
-                        // The annotation does not specify a specific index type.
+                        // The annotation does not specify a specific index
+                        // type.
                         // We use the generic index implementation.
                         JdbmIndex index = new JdbmIndex();
                         index.setAttributeId( createIndex.attribute() );
-                        
+
                         btreePartition.addIndexedAttributes( index );
                     }
                 }
@@ -150,11 +204,13 @@ public class DSAnnotationProcessor
 
     /**
      * Create a DirectoryService from a Unit test annotation
-     *
-     * @param description The annotations containing the info from which we will create the DS
+     * 
+     * @param description The annotations containing the info from which we will create
+     *  the DS
      * @return A valid DS
      */
-    public static DirectoryService getDirectoryService( Description description ) throws Exception
+    public static DirectoryService getDirectoryService( Description description )
+            throws Exception
     {
         CreateDS dsBuilder = description.getAnnotation( CreateDS.class );
 
@@ -171,11 +227,11 @@ public class DSAnnotationProcessor
 
 
     /**
-     * Create a DirectoryService from an annotation. The @CreateDS annotation must
-     * be associated with either the method or the encapsulating class. We will first
-     * try to get the annotation from the method, and if there is none, then we try
-     * at the class level. 
-     *
+     * Create a DirectoryService from an annotation. The @CreateDS annotation
+     * must be associated with either the method or the encapsulating class. We
+     * will first try to get the annotation from the method, and if there is
+     * none, then we try at the class level.
+     * 
      * @return A valid DS
      */
     public static DirectoryService getDirectoryService() throws Exception
@@ -185,7 +241,8 @@ public class DSAnnotationProcessor
         // Get the caller by inspecting the stackTrace
         StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
 
-        // In Java5 the 0th stacktrace element is: java.lang.Thread.dumpThreads(Native Method)
+        // In Java5 the 0th stacktrace element is:
+        // java.lang.Thread.dumpThreads(Native Method)
         int index = stackTrace[0].getMethodName().equals( "dumpThreads" ) ? 3 : 2;
 
         // Get the enclosing class
@@ -224,19 +281,25 @@ public class DSAnnotationProcessor
     /**
      * injects an LDIF entry in the given DirectoryService
      * 
-     * @param entry the LdifEntry to be injected
-     * @param service the DirectoryService
+     * @param entry
+     *            the LdifEntry to be injected
+     * @param service
+     *            the DirectoryService
      * @throws Exception
      */
-    private static void injectEntry( LdifEntry entry, DirectoryService service ) throws LdapException
+    private static void injectEntry( LdifEntry entry, DirectoryService service )
+            throws LdapException
     {
         if ( entry.isChangeAdd() || entry.isLdifContent() )
         {
-            service.getAdminSession().add( new DefaultEntry( service.getSchemaManager(), entry.getEntry() ) );
+            service.getAdminSession().add(
+                    new DefaultEntry( service.getSchemaManager(), entry
+                            .getEntry() ) );
         }
         else if ( entry.isChangeModify() )
         {
-            service.getAdminSession().modify( entry.getDn(), entry.getModificationItems() );
+            service.getAdminSession().modify( entry.getDn(),
+                    entry.getModificationItems() );
         }
         else
         {
@@ -249,20 +312,25 @@ public class DSAnnotationProcessor
     /**
      * injects the LDIF entries present in a LDIF file
      * 
-     * @param service the DirectoryService 
-     * @param ldifFiles the array of LDIF file names (only )
+     * @param service
+     *            the DirectoryService
+     * @param ldifFiles
+     *            the array of LDIF file names (only )
      * @throws Exception
      */
-    public static void injectLdifFiles( DirectoryService service, String[] ldifFiles ) throws Exception
+    public static void injectLdifFiles( Class<?> clazz,
+            DirectoryService service, String[] ldifFiles ) throws Exception
     {
         if ( ( ldifFiles != null ) && ( ldifFiles.length > 0 ) )
         {
             for ( String ldifFile : ldifFiles )
             {
-                InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( ldifFile );
+                InputStream is = clazz.getClassLoader().getResourceAsStream(
+                        ldifFile );
                 if ( is == null )
                 {
-                    throw new FileNotFoundException( "LDIF file '" + ldifFile + "' not found." );
+                    throw new FileNotFoundException( "LDIF file '" + ldifFile
+                            + "' not found." );
                 }
                 else
                 {
@@ -281,14 +349,17 @@ public class DSAnnotationProcessor
 
 
     /**
-     * Inject an ldif String into the server. DN must be relative to the
-     * root.
-     *
-     * @param service the directory service to use 
-     * @param ldif the ldif containing entries to add to the server.
-     * @throws Exception if there is a problem adding the entries from the LDIF
+     * Inject an ldif String into the server. DN must be relative to the root.
+     * 
+     * @param service
+     *            the directory service to use
+     * @param ldif
+     *            the ldif containing entries to add to the server.
+     * @throws Exception
+     *             if there is a problem adding the entries from the LDIF
      */
-    public static void injectEntries( DirectoryService service, String ldif ) throws Exception
+    public static void injectEntries( DirectoryService service, String ldif )
+            throws Exception
     {
         LdifReader reader = new LdifReader();
         List<LdifEntry> entries = reader.parseLdif( ldif );
@@ -306,19 +377,22 @@ public class DSAnnotationProcessor
     /**
      * Apply the LDIF entries to the given service
      */
-    public static void applyLdifs( Description desc, DirectoryService service ) throws Exception
+    public static void applyLdifs( Description desc, DirectoryService service )
+            throws Exception
     {
         if ( desc == null )
         {
             return;
         }
 
-        ApplyLdifFiles applyLdifFiles = desc.getAnnotation( ApplyLdifFiles.class );
+        ApplyLdifFiles applyLdifFiles = desc
+                .getAnnotation( ApplyLdifFiles.class );
 
         if ( applyLdifFiles != null )
         {
-            LOG.debug( "Applying {} to {}", applyLdifFiles.value(), desc.getDisplayName() );
-            injectLdifFiles( service, applyLdifFiles.value() );
+            LOG.debug( "Applying {} to {}", applyLdifFiles.value(),
+                    desc.getDisplayName() );
+            injectLdifFiles( desc.getClass(), service, applyLdifFiles.value() );
         }
 
         ApplyLdifs applyLdifs = desc.getAnnotation( ApplyLdifs.class );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Fri Dec 10 15:44:37 2010
@@ -52,7 +52,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.PasswordPolicyConfiguration;
-import org.apache.directory.server.core.PpolicyConfigContainer;
 import org.apache.directory.server.core.admin.AdministrativePointInterceptor;
 import org.apache.directory.server.core.authz.AciAuthorizationInterceptor;
 import org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor;
@@ -128,14 +127,15 @@ public class AuthenticationInterceptor e
      */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
-    private Set<Authenticator> authenticators;
+    /** A Set of all the existing Authenticator to be used by the bind operation */
+    private Set<Authenticator> authenticators = new HashSet<Authenticator>();
+    
+    /** A map of authenticators associated with the authentication level required */
     private final Map<AuthenticationLevel, Collection<Authenticator>> authenticatorsMapByType = new HashMap<AuthenticationLevel, Collection<Authenticator>>();
 
     /** A reference to the DirectoryService instance */
     private DirectoryService directoryService;
 
-    //private PasswordPolicyConfiguration policyConfig;
-
     /** A reference to the SchemaManager instance */
     private SchemaManager schemaManager;
 
@@ -205,10 +205,11 @@ public class AuthenticationInterceptor e
 
         loadPwdPolicyStateAtributeTypes();
 
-        if ( authenticators == null )
+        if ( ( authenticators == null ) || ( authenticators.size() == 0 ) )
         {
             setDefaultAuthenticators();
         }
+        
         // Register all authenticators
         for ( Authenticator authenticator : authenticators )
         {
@@ -217,14 +218,20 @@ public class AuthenticationInterceptor e
     }
 
 
+    /**
+     * Initialize the set of authenticators with some default values
+     */
     private void setDefaultAuthenticators()
     {
-        Set<Authenticator> set = new HashSet<Authenticator>();
-        set.add( new AnonymousAuthenticator() );
-        set.add( new SimpleAuthenticator() );
-        set.add( new StrongAuthenticator() );
-
-        setAuthenticators( set );
+        if ( authenticators == null )
+        {
+            authenticators = new HashSet<Authenticator>();
+        }
+        
+        authenticators.clear();
+        authenticators.add( new AnonymousAuthenticator() );
+        authenticators.add( new SimpleAuthenticator() );
+        authenticators.add( new StrongAuthenticator() );
     }
 
 
@@ -239,11 +246,37 @@ public class AuthenticationInterceptor e
      */
     public void setAuthenticators( Set<Authenticator> authenticators )
     {
-        this.authenticators = authenticators;
+        if ( authenticators == null )
+        {
+            this.authenticators.clear();
+        }
+        else
+        {
+            this.authenticators = authenticators;
+        }
     }
 
 
     /**
+     * @param authenticators authenticators to be used by this AuthenticationInterceptor
+     */
+    public void setAuthenticators( Authenticator[] authenticators )
+    {
+        if ( authenticators == null )
+        {
+            throw new IllegalArgumentException( "The given authenticators set is null" );
+        }
+        
+        this.authenticators.clear();
+
+        for (Authenticator authenticator : authenticators) 
+        {
+            this.authenticators.add( authenticator );
+        }
+    }
+    
+    
+    /**
      * Deinitializes and deregisters all {@link Authenticator}s from this service.
      */
     public void destroy()
@@ -1088,6 +1121,11 @@ public class AuthenticationInterceptor e
     }
 
 
+    /**
+     * Initialize the PasswordPolicy attributeTypes
+     * 
+     * @throws LdapException If the initialization failed
+     */
     public void loadPwdPolicyStateAtributeTypes() throws LdapException
     {
         if ( directoryService.isPwdPolicyEnabled() )

Propchange: directory/apacheds/trunk/protocol-ldap/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/protocol-ldap:1038305-1044126
 /directory/apacheds/branches/apacheds-codec-merge/protocol-ldap:982369-987590
 /directory/apacheds/branches/apacheds-config/protocol-ldap:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ldap:980138-980936

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java Fri Dec 10 15:44:37 2010
@@ -146,14 +146,8 @@ public class BindHandler extends LdapReq
             if ( principalEntry == null )
             {
                 LOG.info( "The {} principalDN cannot be found in the server : bind failure.", bindRequest.getName() );
-                LdapResult result = bindRequest.getResultResponse().getLdapResult();
-                result.setErrorMessage( "cannot bind the principalDn." );
-                result.setResultCode( ResultCodeEnum.INVALID_CREDENTIALS );
-                ldapSession.getIoSession().write( bindRequest.getResultResponse() );
-                return;
             }
-
-            if ( ( ( ClonedServerEntry ) principalEntry ).getOriginalEntry().contains( SchemaConstants.OBJECT_CLASS_AT,
+            else if ( ( ( ClonedServerEntry ) principalEntry ).getOriginalEntry().contains( SchemaConstants.OBJECT_CLASS_AT,
                 SchemaConstants.REFERRAL_OC ) )
             {
                 LOG.info( "Bind principalDn points to referral." );

Propchange: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:1038305-1044126
 /directory/apacheds/branches/apacheds-codec-merge/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:982369-987590
 /directory/apacheds/branches/apacheds-config/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:980138-980936

Propchange: directory/apacheds/trunk/server-config/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/server-config:1038305-1044156
 /directory/apacheds/branches/apacheds-codec-merge/server-config:982369-987590
 /directory/apacheds/branches/apacheds-config/server-config:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-config:980138-980938

Propchange: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1038305-1044156
 /directory/apacheds/branches/apacheds-codec-merge/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:982369-987590
 /directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:980138-980938

Added: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AnonymousAuthenticatorBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AnonymousAuthenticatorBean.java?rev=1044406&view=auto
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AnonymousAuthenticatorBean.java (added)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AnonymousAuthenticatorBean.java Fri Dec 10 15:44:37 2010
@@ -0,0 +1,32 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+
+package org.apache.directory.server.config.beans;
+
+/**
+ * Anonymous authenticator
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+
+public class AnonymousAuthenticatorBean extends AuthenticatorBean
+{
+
+}

Added: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticationInterceptorBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticationInterceptorBean.java?rev=1044406&view=auto
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticationInterceptorBean.java (added)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticationInterceptorBean.java Fri Dec 10 15:44:37 2010
@@ -0,0 +1,99 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.server.config.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.server.config.ConfigurationElement;
+
+/**
+ * A bean used to store the Authentictor interceptor condifuration
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class AuthenticationInterceptorBean extends InterceptorBean
+{
+    /** The list of authenticators */
+    @ConfigurationElement(attributeType = "ads-authenticators", container = "authenticators")
+    private List<AuthenticatorBean> authenticators = new ArrayList<AuthenticatorBean>();
+
+    /**
+     * Creates a new AuthenticationInterceptorBean instance
+     */
+    public AuthenticationInterceptorBean() 
+    {
+        super();
+    }
+    
+    
+    /**
+     * @param authenticators the authenticators to set
+     */
+    public void setAuthenticators( List<AuthenticatorBean> authenticators )
+    {
+        this.authenticators = authenticators;
+    }
+
+    
+    /**
+     * @param authenticators the authenticators to add
+     */
+    public void addAuthenticators( AuthenticatorBean... authenticators )
+    {
+        for ( AuthenticatorBean authenticator : authenticators )
+        {   
+            this.authenticators.add( authenticator );
+        }
+    }
+    
+
+    /**
+     * @return the extendedOps
+     */
+    public List<AuthenticatorBean> getAuthenticators()
+    {
+        return authenticators;
+    }
+    
+
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "AuthenticationInterceptor :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+        
+        if ( ( authenticators != null ) && ( authenticators.size() > 0 ) )
+        {
+            sb.append( tabs ).append( "  authenticator :\n" );
+
+            for ( AuthenticatorBean authenticator : authenticators )
+            {
+                sb.append( authenticator.toString( tabs + "    " ) );
+            }
+        }
+        
+        return sb.toString();
+    }
+}

Added: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticatorBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticatorBean.java?rev=1044406&view=auto
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticatorBean.java (added)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/AuthenticatorBean.java Fri Dec 10 15:44:37 2010
@@ -0,0 +1,51 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.server.config.beans;
+
+import org.apache.directory.server.config.ConfigurationElement;
+
+/**
+ * Base authenticator bean
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public abstract class AuthenticatorBean extends AdsBaseBean
+{
+    /** The authenticator id */
+    @ConfigurationElement(attributeType = "ads-authenticatorId", isRdn = true)
+    private String authenticatorId;
+    
+    /**
+     * @return the authenticatorId
+     */
+    public String getAuthenticatorId()
+    {
+        return authenticatorId;
+    }
+
+
+    /**
+     * @param authenticatorId the authenticatorId to set
+     */
+    public void setAuthenticatorId( String authenticatorId )
+    {
+        this.authenticatorId = authenticatorId;
+    }
+}

Added: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/DelegatingAuthenticatorBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/DelegatingAuthenticatorBean.java?rev=1044406&view=auto
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/DelegatingAuthenticatorBean.java (added)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/DelegatingAuthenticatorBean.java Fri Dec 10 15:44:37 2010
@@ -0,0 +1,103 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.server.config.beans;
+
+import org.apache.directory.server.config.ConfigurationElement;
+
+/**
+ * A class used to store the Delegating Authenticator configuration.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class DelegatingAuthenticatorBean extends AuthenticatorBean
+{
+    
+    /** The delegate host */
+    @ConfigurationElement(attributeType = "ads-delegateHost")
+    private String delegateHost;
+    
+    /** The delegate port */
+    @ConfigurationElement(attributeType = "ads-delegatePort")
+    private int delegatePort;
+
+
+
+    /**
+     * @return the delegateHost
+     */
+    public String getDelegateHost()
+    {
+        return delegateHost;
+    }
+
+
+    /**
+     * @param delegateHost the delegateHost to set
+     */
+    public void setDelegateHost( String delegateHost )
+    {
+        this.delegateHost = delegateHost;
+    }
+
+
+    /**
+     * @return the delegatePort
+     */
+    public int getDelegatePort()
+    {
+        return delegatePort;
+    }
+
+
+    /**
+     * @param delegatePort the delegatePort to set
+     */
+    public void setDelegatePort( int delegatePort )
+    {
+        this.delegatePort = delegatePort;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "Delegating Authenticator :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+
+        sb.append( tabs ).append( "  delegate host : " ).append( delegateHost ).append( '\n' );
+        sb.append( tabs ).append( "  delegate port : " ).append( delegatePort ).append( '\n' );
+
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
+
+}

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java (original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java Fri Dec 10 15:44:37 2010
@@ -84,7 +84,7 @@ public class LdapServerBean extends DSBa
     /** The list of supported extended operation handlers */
     @ConfigurationElement(attributeType = "ads-extendedOpHandlers", container = "extendedOpHandlers")
     private List<ExtendedOpHandlerBean> extendedOpHandlers = new ArrayList<ExtendedOpHandlerBean>();
-
+    
 
     /**
      * Create a new LdapServerBean instance
@@ -329,6 +329,7 @@ public class LdapServerBean extends DSBa
     }
 
 
+    
     /**
      * @param extendedOps the extendedOps to set
      */

Added: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/SimpleAuthenticatorBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/SimpleAuthenticatorBean.java?rev=1044406&view=auto
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/SimpleAuthenticatorBean.java (added)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/SimpleAuthenticatorBean.java Fri Dec 10 15:44:37 2010
@@ -0,0 +1,30 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+
+package org.apache.directory.server.config.beans;
+
+/**
+ * Simple Authenticator configuration
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class SimpleAuthenticatorBean extends AuthenticatorBean
+{
+}

Added: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/StrongAuthenticatorBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/StrongAuthenticatorBean.java?rev=1044406&view=auto
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/StrongAuthenticatorBean.java (added)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/beans/StrongAuthenticatorBean.java Fri Dec 10 15:44:37 2010
@@ -0,0 +1,30 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+
+package org.apache.directory.server.config.beans;
+
+/**
+ * Strong authenticator bean
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StrongAuthenticatorBean extends AuthenticatorBean
+{
+}

Propchange: directory/apacheds/trunk/server-config/src/main/resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/server-config/src/main/resources:1038305-1044156
 /directory/apacheds/branches/apacheds-cidit/default-config/src/main/resources:897934-898678
 /directory/apacheds/branches/apacheds-codec-merge/server-config/src/main/resources:982369-987590
 /directory/apacheds/branches/apacheds-config/server-config/src/main/resources:1023442-1029077

Modified: directory/apacheds/trunk/server-config/src/main/resources/config.ldif
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/resources/config.ldif?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/resources/config.ldif (original)
+++ directory/apacheds/trunk/server-config/src/main/resources/config.ldif Fri Dec 10 15:44:37 2010
@@ -73,11 +73,38 @@ dn: ads-interceptorId=authenticationInte
 objectclass: top
 objectclass: ads-base
 objectclass: ads-interceptor
+objectclass: ads-authenticationInterceptor
 ads-interceptororder: 2
 ads-interceptorclassname: org.apache.directory.server.core.authn.AuthenticationInterceptor
 ads-interceptorid: authenticationInterceptor
 ads-enabled: TRUE
 
+dn: ou=authenticators,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+ou: authenticators
+objectclass: top
+objectclass: organizationalUnit
+
+dn: ads-authenticatorid=anonymousauthenticator,ou=authenticators,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+ads-authenticatorid: anonymousauthenticator
+objectclass: top
+objectclass: ads-base
+objectClass: ads-authenticator
+objectClass: ads-anonymousAuthenticator
+
+dn: ads-authenticatorid=simpleauthenticator,ou=authenticators,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+ads-authenticatorid: simpleauthenticator
+objectclass: top
+objectclass: ads-base
+objectClass: ads-authenticator
+objectClass: ads-simpleAuthenticator
+
+dn: ads-authenticatorid=strongauthenticator,ou=authenticators,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
+ads-authenticatorid: strongauthenticator
+objectclass: top
+objectclass: ads-base
+objectClass: ads-authenticator
+objectClass: ads-strongAuthenticator
+
 dn: ads-interceptorId=collectiveAttributeInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
 objectclass: top
 objectclass: ads-base

Propchange: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1038305-1044156
 /directory/apacheds/branches/apacheds-cidit/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:898675-899143
 /directory/apacheds/branches/apacheds-codec-merge/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:982369-987590
 /directory/apacheds/branches/apacheds-config/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1023442-1029077

Propchange: directory/apacheds/trunk/server-integ/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/server-integ:1038305-1044151
 /directory/apacheds/branches/apacheds-codec-merge/server-integ:982369-987590
 /directory/apacheds/branches/apacheds-config/server-integ:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-integ:980138-980937

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/suites/StockServerISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/suites/StockServerISuite.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/suites/StockServerISuite.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/suites/StockServerISuite.java Fri Dec 10 15:44:37 2010
@@ -32,6 +32,7 @@ import org.apache.directory.server.kerbe
 import org.apache.directory.server.operations.add.AddIT;
 import org.apache.directory.server.operations.add.AddingEntriesWithSpecialCharactersInRDNIT;
 import org.apache.directory.server.operations.bind.BindIT;
+import org.apache.directory.server.operations.bind.DelegatedAuthIT;
 import org.apache.directory.server.operations.bind.MiscBindIT;
 import org.apache.directory.server.operations.bind.SaslBindIT;
 import org.apache.directory.server.operations.bind.SimpleBindIT;
@@ -84,6 +85,7 @@ import org.junit.runners.Suite;
 
         // operations.bind
         BindIT.class,
+        DelegatedAuthIT.class,
         MiscBindIT.class,
         SaslBindIT.class,
         SimpleBindIT.class,

Propchange: directory/apacheds/trunk/service-builder/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -0,0 +1 @@
+/directory/apacheds/branches/antoine/service-builder:1038305-1044163

Modified: directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java (original)
+++ directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java Fri Dec 10 15:44:37 2010
@@ -32,7 +32,11 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
 
+import org.apache.directory.server.config.beans.AnonymousAuthenticatorBean;
+import org.apache.directory.server.config.beans.AuthenticationInterceptorBean;
+import org.apache.directory.server.config.beans.AuthenticatorBean;
 import org.apache.directory.server.config.beans.ChangeLogBean;
+import org.apache.directory.server.config.beans.DelegatingAuthenticatorBean;
 import org.apache.directory.server.config.beans.DirectoryServiceBean;
 import org.apache.directory.server.config.beans.ExtendedOpHandlerBean;
 import org.apache.directory.server.config.beans.HttpServerBean;
@@ -48,6 +52,8 @@ import org.apache.directory.server.confi
 import org.apache.directory.server.config.beans.PartitionBean;
 import org.apache.directory.server.config.beans.PasswordPolicyBean;
 import org.apache.directory.server.config.beans.SaslMechHandlerBean;
+import org.apache.directory.server.config.beans.SimpleAuthenticatorBean;
+import org.apache.directory.server.config.beans.StrongAuthenticatorBean;
 import org.apache.directory.server.config.beans.TcpTransportBean;
 import org.apache.directory.server.config.beans.TransportBean;
 import org.apache.directory.server.config.beans.UdpTransportBean;
@@ -56,6 +62,12 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.InstanceLayout;
 import org.apache.directory.server.core.PasswordPolicyConfiguration;
 import org.apache.directory.server.core.PpolicyConfigContainer;
+import org.apache.directory.server.core.authn.AnonymousAuthenticator;
+import org.apache.directory.server.core.authn.AuthenticationInterceptor;
+import org.apache.directory.server.core.authn.Authenticator;
+import org.apache.directory.server.core.authn.DelegatingAuthenticator;
+import org.apache.directory.server.core.authn.SimpleAuthenticator;
+import org.apache.directory.server.core.authn.StrongAuthenticator;
 import org.apache.directory.server.core.changelog.ChangeLog;
 import org.apache.directory.server.core.changelog.DefaultChangeLog;
 import org.apache.directory.server.core.interceptor.Interceptor;
@@ -148,6 +160,14 @@ public class ServiceBuilder
             {
                 LOG.debug( "loading the interceptor class {} and instantiating", interceptorBean.getInterceptorClassName() );
                 Interceptor interceptor = ( Interceptor ) Class.forName( interceptorBean.getInterceptorClassName() ).newInstance();
+                
+                if (interceptorBean instanceof AuthenticationInterceptorBean) {
+                    // Transports
+                    Authenticator[] authenticators = createAuthenticators( ((AuthenticationInterceptorBean)interceptorBean).getAuthenticators() );
+                    ((AuthenticationInterceptor) interceptor).setAuthenticators( authenticators );
+                    
+                }
+                
                 interceptors.add( interceptor );
             }
             catch ( Exception e )
@@ -386,7 +406,38 @@ public class ServiceBuilder
         return handler;
     }
     
-    
+    /**
+     * Creates a Authenticator from the configuration
+     * 
+     * @param authenticatorBean The created instance of authenticator
+     * @return An instance of authenticator
+     */
+    public static Authenticator createAuthenticator( AuthenticatorBean authenticatorBean )
+    {
+        Authenticator authenticator = null;
+        
+        if (authenticatorBean instanceof SimpleAuthenticatorBean)
+        {
+            authenticator = new SimpleAuthenticator();
+        }
+        else if (authenticatorBean instanceof AnonymousAuthenticatorBean)
+        {
+            authenticator = new AnonymousAuthenticator();
+        }
+        else if (authenticatorBean instanceof StrongAuthenticatorBean)
+        {
+            authenticator = new StrongAuthenticator();
+        }
+        else if (authenticatorBean instanceof DelegatingAuthenticatorBean)
+        {
+            authenticator = new DelegatingAuthenticator();
+            ((DelegatingAuthenticator)authenticator).setDelegateHost( ((DelegatingAuthenticatorBean) authenticatorBean).getDelegateHost() );
+            ((DelegatingAuthenticator)authenticator).setDelegatePort( ((DelegatingAuthenticatorBean) authenticatorBean).getDelegatePort() );
+        }
+        
+        return authenticator;
+    }
+
     /**
      * Creates a Transport from the configuration
      * 
@@ -427,6 +478,25 @@ public class ServiceBuilder
      * @param transportBeans The array of Transport configuration
      * @return An arry of Transport instance
      */
+    public static Authenticator[] createAuthenticators( List<AuthenticatorBean> list )
+    {
+        Authenticator[] authenticators = new Authenticator[ list.size() ];
+        int i = 0;
+        
+        for ( AuthenticatorBean authenticatorBean : list )
+        {
+            authenticators[i++] = createAuthenticator( authenticatorBean );
+        }
+        
+        return authenticators;
+    }
+
+    /**
+     * Creates the array of transports read from the DIT 
+     * 
+     * @param transportBeans The array of Transport configuration
+     * @return An arry of Transport instance
+     */
     public static Transport[] createTransports( TransportBean[] transportBeans )
     {
         Transport[] transports = new Transport[ transportBeans.length ];
@@ -442,8 +512,6 @@ public class ServiceBuilder
         
         return transports;
     }
-
-    
     /**
      * Helper method to create an Array of EncryptionTypes from an array of Strings
      */

Propchange: directory/apacheds/trunk/test-framework/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/apacheds/branches/antoine/test-framework:1038305-1044164
 /directory/apacheds/branches/apacheds-codec-merge/test-framework:982369-987590
 /directory/apacheds/branches/apacheds-config/test-framework:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/test-framework:980138-980938

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java (original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java Fri Dec 10 15:44:37 2010
@@ -182,23 +182,7 @@ public class FrameworkRunner extends Blo
             // then use the DS created above
             if ( classLdapServerBuilder != null )
             {
-                int minPort = 0;
-
-                if ( suite != null )
-                {
-                    LdapServer suiteServer = suite.getLdapServer();
-
-                    if ( suiteServer != null )
-                    {
-                        for ( Transport transport : suiteServer.getTransports() )
-                        {
-                            if ( minPort <= transport.getPort() )
-                            {
-                                minPort = transport.getPort();
-                            }
-                        }
-                    }
-                }
+                int minPort = getMinPort();
 
                 classLdapServer = ServerAnnotationProcessor.createLdapServer( getDescription(), directoryService,
                     minPort + 1 );
@@ -279,11 +263,41 @@ public class FrameworkRunner extends Blo
 
 
     /**
+     * Get the lower port out of all the transports
+     */
+    private int getMinPort()
+    {
+        int minPort = 0;
+
+        if ( suite != null )
+        {
+            LdapServer suiteServer = suite.getLdapServer();
+
+            if ( suiteServer != null )
+            {
+                for ( Transport transport : suiteServer.getTransports() )
+                {
+                    if ( minPort <= transport.getPort() )
+                    {
+                        minPort = transport.getPort();
+                    }
+                }
+            }
+        }
+        
+        return minPort;
+    }
+
+
+    /**
      * {@inheritDoc}
      */
     @Override
     protected void runChild( FrameworkMethod method, RunNotifier notifier )
     {
+        /** The LdapServer for this method, if any */
+        LdapServer methodLdapServer = null;
+        
         // Don't run the test if the @Ignored annotation is used
         if ( method.getAnnotation( Ignore.class ) != null )
         {
@@ -303,6 +317,10 @@ public class FrameworkRunner extends Blo
         Description classDescription = getDescription();
         Description methodDescription = describeChild( method );
 
+        // Before running any test, check to see if we must create a class DS
+        // Get the LdapServerBuilder, if any
+        CreateLdapServer methodLdapServerBuilder = methodDescription.getAnnotation( CreateLdapServer.class );
+
         // Ok, ready to run the test
         try
         {
@@ -361,6 +379,14 @@ public class FrameworkRunner extends Blo
                 DSAnnotationProcessor.applyLdifs( methodDescription, directoryService );
             }
 
+            if ( methodLdapServerBuilder != null )
+            {
+                int minPort = getMinPort();
+
+                methodLdapServer = ServerAnnotationProcessor.createLdapServer( methodDescription, directoryService,
+                    minPort + 1 );
+            }
+
             // At this point, we know which service to use.
             // Inject it into the class
             Field dirServiceField = getTestClass().getJavaClass().getField( DIRECTORY_SERVICE_FIELD_NAME );
@@ -377,7 +403,13 @@ public class FrameworkRunner extends Blo
             DirectoryService oldLdapServerDirService = null;
             DirectoryService oldKdcServerDirService = null;
             
-            if ( classLdapServer != null )
+            if ( methodLdapServer != null ) {
+                // setting the directoryService is required to inject the correct level DS instance in the class or suite level LdapServer
+                methodLdapServer.setDirectoryService( directoryService );
+                
+                ldapServerField.set( getTestClass().getJavaClass(), methodLdapServer );
+            }    
+            else if ( classLdapServer != null )
             {
                 oldLdapServerDirService = classLdapServer.getDirectoryService();
                 
@@ -400,6 +432,11 @@ public class FrameworkRunner extends Blo
             // Run the test
             super.runChild( method, notifier );
 
+            if ( methodLdapServer != null )
+            {
+                methodLdapServer.stop();
+            }
+
             if ( oldLdapServerDirService != null )
             {
                 classLdapServer.setDirectoryService( oldLdapServerDirService );

Propchange: directory/shared/trunk/ldap-schema/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,4 +1,5 @@
 /directory/apacheds/branches/apacheds-replication/schema-data:749790-764110
+/directory/shared/branches/antoine/ldap-schema:1038306-1044343
 /directory/shared/branches/shared-codec-merge/ldap-schema:982370-987558
 /directory/shared/branches/shared-config/ldap-schema:1023444-1029061
 /directory/shared/branches/shared-dnfactory-experiment/ldap-schema:980352-980933

Propchange: directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/shared/branches/antoine/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:1038306-1044343
 /directory/shared/branches/shared-codec-merge/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:982370-987558
 /directory/shared/branches/shared-config/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:1023444-1029061
 /directory/shared/branches/shared-dnfactory-experiment/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:980352-980933

Propchange: directory/shared/trunk/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 10 15:44:37 2010
@@ -1,3 +1,4 @@
+/directory/shared/branches/antoine/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:1038306-1044343
 /directory/shared/branches/shared-codec-merge/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:982370-987558
 /directory/shared/branches/shared-config/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:1023444-1029061
 /directory/shared/branches/shared-dnfactory-experiment/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:980352-980933

Modified: directory/shared/trunk/ldap-schema/src/main/resources/schema-all.ldif
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema/src/main/resources/schema-all.ldif?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema/src/main/resources/schema-all.ldif (original)
+++ directory/shared/trunk/ldap-schema/src/main/resources/schema-all.ldif Fri Dec 10 15:44:37 2010
@@ -2201,6 +2201,62 @@ createtimestamp: 20100111145214Z
 creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
 entrycsn: 20100111202214.922000Z#000000#000#000000
 
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.2.930,ou=attributeTypes,cn=adsconfig,ou=schema
+m-ordering: caseExactOrderingMatch
+m-singlevalue: TRUE
+m-oid: 1.3.6.1.4.1.18060.0.4.1.2.930
+m-description: Authenticator Id
+m-substr: caseExactSubstringsMatch
+objectclass: metaTop
+objectclass: metaAttributeType
+objectclass: top
+m-syntax: 1.3.6.1.4.1.1466.115.121.1.44
+m-name: ads-authenticatorId
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+m-equality: caseExactMatch
+m-length: 0
+
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.2.931,ou=attributeTypes,cn=adsconfig,ou=schema
+m-ordering: caseExactOrderingMatch
+m-singlevalue: TRUE
+m-oid: 1.3.6.1.4.1.18060.0.4.1.2.931
+m-description: an external host handling delegate authentication
+m-substr: caseExactSubstringsMatch
+objectclass: metaTop
+objectclass: metaAttributeType
+objectclass: top
+m-syntax: 1.3.6.1.4.1.1466.115.121.1.44
+m-name: ads-delegateHost
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+m-equality: caseExactMatch
+m-length: 0
+
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.2.932,ou=attributeTypes,cn=adsconfig,ou=schema
+m-ordering: integerOrderingMatch
+m-singlevalue: TRUE
+m-oid: 1.3.6.1.4.1.18060.0.4.1.2.932
+m-description: Port number on system
+objectclass: metaTop
+objectclass: metaAttributeType
+objectclass: top
+m-syntax: 1.3.6.1.4.1.1466.115.121.1.27
+m-name: ads-delegatePort
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+m-equality: integerMatch
+m-length: 0
+
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.2.933, ou=attributeTypes, cn=adsconfig, ou=schema
+objectclass: top
+objectclass: metaTop
+objectclass: metaAttributeType
+m-name: ads-authenticators
+m-oid: 1.3.6.1.4.1.18060.0.4.1.2.933
+m-description: A reference to the authenticators
+m-supattributetype: ads-compositeElement
+createtimestamp: 20100111145216Z
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+entrycsn: 20100111202216.043000Z#000000#000#000000
+
 dn: ou=comparators, cn=adsconfig, ou=schema
 createtimestamp: 20100111145217Z
 ou: comparators
@@ -2346,6 +2402,19 @@ m-must: ads-interceptorId
 m-must: ads-interceptorOrder
 m-must: ads-interceptorClassName
 
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.131, ou=objectClasses, cn=adsconfig, ou=schema
+objectclass: metaObjectClass
+objectclass: metaTop
+objectclass: top
+m-name: ads-authenticationInterceptor
+m-oid: 1.3.6.1.4.1.18060.0.4.1.3.131
+m-description: The AuthenticationInterceptor ObjectClass
+m-supobjectclass: ads-interceptor
+m-may: ads-authenticators
+createtimestamp: 20100111145217Z
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+entrycsn: 20100111202217.914000Z#000000#000#000000
+
 dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.140, ou=objectClasses, cn=adsconfig, ou=sche
  ma
 objectclass: metaObjectClass
@@ -2772,6 +2841,63 @@ m-may: ads-pwdMinDelay
 m-may: ads-pwdMaxDelay
 m-may: ads-pwdMaxIdle
 
+
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.901, ou=objectClasses, cn=adsconfig, ou=schema
+objectclass: metaObjectClass
+objectclass: metaTop
+objectclass: top
+m-name: ads-authenticator
+m-oid: 1.3.6.1.4.1.18060.0.4.1.3.901
+m-description: A generic authenticator
+m-supobjectclass: ads-base
+m-typeobjectclass: ABSTRACT
+createtimestamp: 20100111145217Z
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+entrycsn: 20100111202217.958000Z#000000#000#000000
+m-must: ads-authenticatorId
+
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.902,ou=objectClasses,cn=adsconfig,ou=schema
+m-oid: 1.3.6.1.4.1.18060.0.4.1.3.902
+m-description: anonymous authenticator
+m-supobjectclass: ads-authenticator
+objectclass: metaObjectClass
+objectclass: metaTop
+objectclass: top
+m-name: ads-anonymousAuthenticator
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.903,ou=objectClasses,cn=adsconfig,ou=schema
+m-oid: 1.3.6.1.4.1.18060.0.4.1.3.903
+m-description: simple authenticator
+m-supobjectclass: ads-authenticator
+objectclass: metaObjectClass
+objectclass: metaTop
+objectclass: top
+m-name: ads-simpleAuthenticator
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.904,ou=objectClasses,cn=adsconfig,ou=schema
+m-must: ads-delegateHost
+m-must: ads-delegatePort
+m-oid: 1.3.6.1.4.1.18060.0.4.1.3.904
+m-description: delegated authentication configuration
+m-supobjectclass: ads-authenticator
+objectclass: metaObjectClass
+objectclass: metaTop
+objectclass: top
+m-name: ads-delegatingAuthenticator
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.905,ou=objectClasses,cn=adsconfig,ou=schema
+m-oid: 1.3.6.1.4.1.18060.0.4.1.3.905
+m-description: strong authenticator
+m-supobjectclass: ads-authenticator
+objectclass: metaObjectClass
+objectclass: metaTop
+objectclass: top
+m-name: ads-strongAuthenticator
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+
 dn: ou=syntaxCheckers, cn=adsconfig, ou=schema
 createtimestamp: 20100111145218Z
 ou: syntaxcheckers

Copied: directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.904.ldif (from r1044343, directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.904.ldif)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema/src/main/resources/schema/ou%3Dschema/cn%3Dadsconfig/ou%3Dobjectclasses/m-oid%3D1.3.6.1.4.1.18060.0.4.1.3.904.ldif?p2=directory/shared/trunk/ldap-schema/src/main/resources/schema/ou%3Dschema/cn%3Dadsconfig/ou%3Dobjectclasses/m-oid%3D1.3.6.1.4.1.18060.0.4.1.3.904.ldif&p1=directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou%3Dschema/cn%3Dadsconfig/ou%3Dobjectclasses/m-oid%3D1.3.6.1.4.1.18060.0.4.1.3.904.ldif&r1=1044343&r2=1044406&rev=1044406&view=diff
==============================================================================
--- directory/shared/branches/antoine/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.904.ldif (original)
+++ directory/shared/trunk/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.904.ldif Fri Dec 10 15:44:37 2010
@@ -1,13 +1,13 @@
 version: 1
 dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.904,ou=objectClasses,cn=adsconfig,ou=schema
-m-must: ads-delegateHost
-m-must: ads-delegatePort
 m-oid: 1.3.6.1.4.1.18060.0.4.1.3.904
 m-description: delegated authentication configuration
 m-supobjectclass: ads-authenticator
+creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
 objectclass: metaObjectClass
 objectclass: metaTop
 objectclass: top
 m-name: ads-delegatingAuthenticator
-creatorsname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system
+m-must: ads-delegateHost
+m-must: ads-delegatePort
 

Modified: directory/shared/trunk/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java?rev=1044406&r1=1044405&r2=1044406&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java (original)
+++ directory/shared/trunk/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java Fri Dec 10 15:44:37 2010
@@ -152,14 +152,14 @@ public class SchemaManagerEnableDisableL
         assertEquals( 0, disabled.size() );
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 420, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 424, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 48, schemaManager.getComparatorRegistry().size() );
         assertEquals( 48, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 48, schemaManager.getNormalizerRegistry().size() );
-        assertEquals( 116, schemaManager.getObjectClassRegistry().size() );
+        assertEquals( 122, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 66, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 71, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 656, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 666, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 12, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNull( schemaManager.getRegistries().getLoadedSchema( "nis" ) );
@@ -197,14 +197,14 @@ public class SchemaManagerEnableDisableL
         assertNotNull( schemaManager.lookupAttributeTypeRegistry( "gecos" ) );
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 447, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 451, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 49, schemaManager.getComparatorRegistry().size() );
         assertEquals( 49, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 49, schemaManager.getNormalizerRegistry().size() );
-        assertEquals( 129, schemaManager.getObjectClassRegistry().size() );
+        assertEquals( 135, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 68, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 73, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 699, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 709, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 13, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNotNull( schemaManager.getRegistries().getLoadedSchema( "nis" ) );
@@ -237,14 +237,14 @@ public class SchemaManagerEnableDisableL
         }
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 420, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 424, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 48, schemaManager.getComparatorRegistry().size() );
         assertEquals( 48, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 48, schemaManager.getNormalizerRegistry().size() );
-        assertEquals( 116, schemaManager.getObjectClassRegistry().size() );
+        assertEquals( 122, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 66, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 71, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 656, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 666, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 12, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNull( schemaManager.getRegistries().getLoadedSchema( "nis" ) );



Re: svn commit: r1044406 - in /directory: apacheds/trunk/core-annotations/ apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/ a...

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Emmanuel, Alex, Kiran, Pierre-Arnaud,
Thanks very much, in fact this was a slightly larger task for all 
involved than what I thought initially.
Looking forward to contributing more to ApacheDS.
Regards,

Antoine

On 12/10/2010 10:44 AM, elecharny@apache.org wrote:
> Author: elecharny
> Date: Fri Dec 10 15:44:37 2010
> New Revision: 1044406
>
> URL: http://svn.apache.org/viewvc?rev=1044406&view=rev
> Log:
> Merged Antoine's branch into trunk
>