You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by dj...@apache.org on 2007/10/13 00:09:52 UTC
svn commit: r584293 - in /directory/apacheds/branches/bigbang:
apacheds-xbean-spring/ core/src/main/java/org/apache/directory/server/core/
protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/
protocol-ldap/src/main/java/org/apache/...
Author: djencks
Date: Fri Oct 12 15:09:40 2007
New Revision: 584293
URL: http://svn.apache.org/viewvc?rev=584293&view=rev
Log:
Intermediate commit. Non-integration tests pass. spring startup test works. Needs extensive cleanup
Modified:
directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerTest.java
directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DatagramAcceptor.java
directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java
directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java
directory/apacheds/branches/bigbang/server-xml/pom.xml
directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml
Modified: directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml (original)
+++ directory/apacheds/branches/bigbang/apacheds-xbean-spring/pom.xml Fri Oct 12 15:09:40 2007
@@ -13,6 +13,13 @@
<dependencies>
<dependency>
<groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-protocol-shared</artifactId>
+ <version>${pom.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-protocol-changepw</artifactId>
<version>${pom.version}</version>
<classifier>sources</classifier>
@@ -79,6 +86,7 @@
<version>${pom.version}</version>
<classifier>sources</classifier>
</dependency>
+
</dependencies>
<build>
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Fri Oct 12 15:09:40 2007
@@ -544,6 +544,10 @@
}
+ /**
+ * @org.apache.xbean.InitMethod
+ * @throws NamingException if the LDAP server cannot be started
+ */
public synchronized void startup() throws NamingException
{
if ( started )
@@ -600,6 +604,9 @@
}
+ /**
+ * @org.apache.xbean.DestroyMethod
+ */
public synchronized void shutdown() throws NamingException
{
if ( !started )
Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java Fri Oct 12 15:09:40 2007
@@ -21,6 +21,7 @@
import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.DefaultDirectoryService;
import org.apache.directory.server.core.interceptor.Interceptor;
import org.apache.directory.server.core.kerberos.KeyDerivationInterceptor;
import org.apache.directory.server.core.partition.Partition;
@@ -79,14 +80,13 @@
*/
public void setUp() throws Exception
{
- apacheDS.setAllowAnonymousAccess( false );
+ super.setUp();
- LdapServer ldapConfig = apacheDS.getLdapServer();
- ldapConfig.setSaslHost( "localhost" );
- ldapConfig.setSaslPrincipal( "ldap/localhost@EXAMPLE.COM" );
+ setAllowAnonymousAccess( false );
+ ldapServer.setSaslHost( "localhost" );
+ ldapServer.setSaslPrincipal( "ldap/localhost@EXAMPLE.COM" );
- SocketAcceptor socketAcceptor = new SocketAcceptor( null );
- KdcServer kdcConfig = new KdcServer( null, socketAcceptor, apacheDS.getDirectoryService() );
+ KdcServer kdcConfig = new KdcServer( null, socketAcceptor, directoryService );
kdcConfig.setEnabled( true );
kdcConfig.setSearchBaseDn( "ou=users,dc=example,dc=com" );
kdcConfig.setSecurityAuthentication( "simple" );
@@ -94,42 +94,11 @@
kdcConfig.setSecurityPrincipal( "uid=admin,ou=system" );
Attributes attrs;
- Set<Partition> partitions = new HashSet<Partition>();
-
- // Add partition 'example'
- JdbmPartition partition = new JdbmPartition();
- partition.setId( "example" );
- partition.setSuffix( "dc=example,dc=com" );
-
- Set<Index> indexedAttrs = new HashSet<Index>();
- indexedAttrs.add( new JdbmIndex( "ou" ) );
- indexedAttrs.add( new JdbmIndex( "dc" ) );
- indexedAttrs.add( new JdbmIndex( "objectClass" ) );
- partition.setIndexedAttributes( indexedAttrs );
-
- attrs = new AttributesImpl( true );
- Attribute attr = new AttributeImpl( "objectClass" );
- attr.add( "top" );
- attr.add( "domain" );
- attrs.put( attr );
- attr = new AttributeImpl( "dc" );
- attr.add( "example" );
- attrs.put( attr );
- partition.setContextEntry( attrs );
- partitions.add( partition );
- apacheDS.getDirectoryService().setPartitions( partitions );
-
- List<Interceptor> list = apacheDS.getDirectoryService().getInterceptors();
- list.add( new KeyDerivationInterceptor() );
- apacheDS.getDirectoryService().setInterceptors( list );
-
- doDelete( apacheDS.getDirectoryService().getWorkingDirectory() );
- port = AvailablePortFinder.getNextAvailable( 1024 );
- ldapConfig.setIpPort( port );
- apacheDS.getDirectoryService().setShutdownHookEnabled( false );
-
- super.setUp();
+// doDelete( directoryService.getWorkingDirectory() );
+// port = AvailablePortFinder.getNextAvailable( 1024 );
+// ldapServer.setIpPort( port );
+// directoryService.setShutdownHookEnabled( false );
setContexts( "uid=admin,ou=system", "secret" );
@@ -157,7 +126,7 @@
// Get a context, create the ou=users subcontext, then create the 3 principals.
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( DirectoryService.JNDI_KEY, apacheDS.getDirectoryService() );
+ env.put( DirectoryService.JNDI_KEY, directoryService );
env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
env.put( Context.PROVIDER_URL, "dc=example,dc=com" );
env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
@@ -177,6 +146,40 @@
attrs = getPrincipalAttributes( "Service", "LDAP Service", "ldap", "randall", "ldap/localhost@EXAMPLE.COM" );
users.createSubcontext( "uid=ldap", attrs );
+ }
+
+ protected void configureDirectoryService()
+ {
+ Attributes attrs;
+ Set<Partition> partitions = new HashSet<Partition>();
+
+ // Add partition 'example'
+ JdbmPartition partition = new JdbmPartition();
+ partition.setId( "example" );
+ partition.setSuffix( "dc=example,dc=com" );
+
+ Set<Index> indexedAttrs = new HashSet<Index>();
+ indexedAttrs.add( new JdbmIndex( "ou" ) );
+ indexedAttrs.add( new JdbmIndex( "dc" ) );
+ indexedAttrs.add( new JdbmIndex( "objectClass" ) );
+ partition.setIndexedAttributes( indexedAttrs );
+
+ attrs = new AttributesImpl( true );
+ Attribute attr = new AttributeImpl( "objectClass" );
+ attr.add( "top" );
+ attr.add( "domain" );
+ attrs.put( attr );
+ attr = new AttributeImpl( "dc" );
+ attr.add( "example" );
+ attrs.put( attr );
+ partition.setContextEntry( attrs );
+
+ partitions.add( partition );
+ directoryService.setPartitions( partitions );
+
+ List<Interceptor> list = directoryService.getInterceptors();
+ list.add( new KeyDerivationInterceptor() );
+ directoryService.setInterceptors( list );
}
Modified: directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Fri Oct 12 15:09:40 2007
@@ -20,42 +20,98 @@
package org.apache.directory.server.ldap;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.ldap.Control;
+
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.ldap.support.*;
+import org.apache.directory.server.ldap.support.AbandonHandler;
+import org.apache.directory.server.ldap.support.AddHandler;
+import org.apache.directory.server.ldap.support.BindHandler;
+import org.apache.directory.server.ldap.support.CompareHandler;
+import org.apache.directory.server.ldap.support.DefaultAbandonHandler;
+import org.apache.directory.server.ldap.support.DefaultAddHandler;
+import org.apache.directory.server.ldap.support.DefaultBindHandler;
+import org.apache.directory.server.ldap.support.DefaultCompareHandler;
+import org.apache.directory.server.ldap.support.DefaultDeleteHandler;
+import org.apache.directory.server.ldap.support.DefaultExtendedHandler;
+import org.apache.directory.server.ldap.support.DefaultModifyDnHandler;
+import org.apache.directory.server.ldap.support.DefaultModifyHandler;
+import org.apache.directory.server.ldap.support.DefaultSearchHandler;
+import org.apache.directory.server.ldap.support.DefaultUnbindHandler;
+import org.apache.directory.server.ldap.support.DeleteHandler;
+import org.apache.directory.server.ldap.support.ExtendedHandler;
+import org.apache.directory.server.ldap.support.ModifyDnHandler;
+import org.apache.directory.server.ldap.support.ModifyHandler;
+import org.apache.directory.server.ldap.support.SearchHandler;
+import org.apache.directory.server.ldap.support.UnbindHandler;
import org.apache.directory.server.ldap.support.ssl.LdapsInitializer;
import org.apache.directory.server.protocol.shared.ServiceConfiguration;
import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
import org.apache.directory.shared.asn1.codec.Asn1CodecDecoder;
import org.apache.directory.shared.asn1.codec.Asn1CodecEncoder;
-import org.apache.directory.shared.ldap.message.*;
+import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
+import org.apache.directory.shared.ldap.exception.LdapNamingException;
+import org.apache.directory.shared.ldap.message.AbandonRequest;
+import org.apache.directory.shared.ldap.message.AddRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.CascadeControl;
+import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.EntryChangeControl;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.ExtendedRequestImpl;
+import org.apache.directory.shared.ldap.message.ManageDsaITControl;
+import org.apache.directory.shared.ldap.message.MessageDecoder;
+import org.apache.directory.shared.ldap.message.MessageEncoder;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.MutableControl;
+import org.apache.directory.shared.ldap.message.PersistentSearchControl;
+import org.apache.directory.shared.ldap.message.Request;
+import org.apache.directory.shared.ldap.message.ResponseCarryingMessageException;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.apache.directory.shared.ldap.message.ResultResponseRequest;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.message.SubentriesControl;
+import org.apache.directory.shared.ldap.message.UnbindRequest;
import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
-import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
-import org.apache.mina.common.*;
+import org.apache.mina.common.DefaultIoFilterChainBuilder;
+import org.apache.mina.common.IoFilterChain;
+import org.apache.mina.common.IoFilterChainBuilder;
+import org.apache.mina.common.IoHandler;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.common.ThreadModel;
+import org.apache.mina.common.WriteFuture;
import org.apache.mina.filter.SSLFilter;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;
import org.apache.mina.handler.demux.DemuxingIoHandler;
-import org.apache.mina.util.SessionLog;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
+import org.apache.mina.util.SessionLog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.ldap.Control;
-import java.util.*;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-
/**
* An LDAP protocol provider implementation which dynamically associates
@@ -63,6 +119,7 @@
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
+ * @org.apache.xbean.XBean
*/
public class LdapServer extends ServiceConfiguration
{
@@ -97,8 +154,6 @@
/** a set of supported controls */
private Set<String> supportedControls;
- private DirectoryService directoryService;
-
/** The maximum size limit. */
private int maxSizeLimit = MAX_SIZE_LIMIT_DEFAULT; // set to default value
@@ -158,6 +213,8 @@
private final SocketAcceptor socketAcceptor;
+ private final DirectoryService directoryService;
+
/** tracks state of the server */
private boolean started;
@@ -166,10 +223,19 @@
* Creates an LDAP protocol provider.
*
* @param socketAcceptor the mina socket acceptor wrapper
+ * @param directoryService
*/
- public LdapServer( SocketAcceptor socketAcceptor )
+ public LdapServer( SocketAcceptor socketAcceptor, DirectoryService directoryService )
{
this.socketAcceptor = socketAcceptor;
+ this.directoryService = directoryService;
+ this.codecFactory = new ProtocolCodecFactoryImpl( directoryService );
+ Hashtable<String,Object> copy = new Hashtable<String,Object>();
+ copy.put( Context.PROVIDER_URL, "" );
+ copy.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
+ copy.put( DirectoryService.JNDI_KEY, directoryService );
+ this.registry = new SessionRegistry( this, copy );
+
super.setIpPort( IP_PORT_DEFAULT );
super.setEnabled( true );
super.setServicePid( SERVICE_PID_DEFAULT );
@@ -709,24 +775,6 @@
}
- public void setDirectoryService( DirectoryService directoryService )
- {
- this.directoryService = directoryService;
-
- if ( bindHandler != null )
- {
- this.bindHandler.setDirectoryService( directoryService );
- }
- this.codecFactory = new ProtocolCodecFactoryImpl( directoryService );
- Hashtable<String,Object> copy = new Hashtable<String,Object>();
- copy.put( Context.PROVIDER_URL, "" );
- copy.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
- copy.put( DirectoryService.JNDI_KEY, directoryService );
- this.registry = new SessionRegistry( this, copy );
-
- }
-
-
public Set<String> getSupportedControls()
{
return supportedControls;
@@ -782,10 +830,7 @@
this.handler.removeMessageHandler( BindRequest.class );
this.bindHandler = bindHandler;
this.bindHandler.setProtocolProvider( this );
- if ( directoryService != null )
- {
this.bindHandler.setDirectoryService( directoryService );
- }
//noinspection unchecked
this.handler.addMessageHandler( BindRequest.class, this.bindHandler );
}
Modified: directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerTest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerTest.java (original)
+++ directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerTest.java Fri Oct 12 15:09:40 2007
@@ -35,10 +35,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
/**
* Tests the .
@@ -66,9 +62,8 @@
ByteBuffer.setUseDirectBuffers( false );
tcpAcceptor = new SocketAcceptor( null );
- ldapServer = new LdapServer( tcpAcceptor );
+ ldapServer = new LdapServer( tcpAcceptor, directoryService );
ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
- ldapServer.setDirectoryService( directoryService );
System.err.println( "********** => " + ldapServer.getIpPort() );
if ( getName().equals( "testAlternativeConfiguration" ) )
{
Modified: directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DatagramAcceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DatagramAcceptor.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DatagramAcceptor.java (original)
+++ directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DatagramAcceptor.java Fri Oct 12 15:09:40 2007
@@ -31,7 +31,7 @@
import org.apache.mina.filter.executor.ExecutorFilter;
/**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
* @org.apache.xbean.XBean
*/
public class DatagramAcceptor extends org.apache.mina.transport.socket.nio.DatagramAcceptor
Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (original)
+++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java Fri Oct 12 15:09:40 2007
@@ -26,9 +26,6 @@
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -48,10 +45,7 @@
import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.util.StringTools;
import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoAcceptor;
import org.apache.mina.common.SimpleByteBufferAllocator;
-import org.apache.mina.filter.executor.ExecutorFilter;
-import org.apache.mina.transport.socket.nio.SocketAcceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -65,7 +59,6 @@
*/
public class ApacheDS
{
- public static final String JNDI_KEY = ApacheDS.class.toString();
public static final int MAX_THREADS_DEFAULT = 32;
private static final String WINDOWSFILE_ATTR = "windowsFilePath";
@@ -74,7 +67,6 @@
private static final String LDIF_FILES_DN = "ou=loadedLdifFiles,ou=configuration,ou=system";
private static final long DEFAULT_SYNC_PERIOD_MILLIS = 20000;
- private int maxThreads = MAX_THREADS_DEFAULT;
private long synchPeriodMillis = DEFAULT_SYNC_PERIOD_MILLIS;
private boolean enableNetworking = true;
private Hashtable<String,Object> environment = new Hashtable<String,Object>();
@@ -82,25 +74,28 @@
private File ldifDirectory;
private final List<LdifLoadFilter> ldifFilters = new ArrayList<LdifLoadFilter>();
- private LdapServer ldapServer;
- private LdapServer ldapsServer;
- private DirectoryService directoryService = new DefaultDirectoryService();
-
- private SocketAcceptor tcpAcceptor;
- protected ExecutorService ioExecutor;
- protected ExecutorService logicExecutor;
+ private final LdapServer ldapServer;
+ private final LdapServer ldapsServer;
+ private final DirectoryService directoryService;
+
+// private SocketAcceptor tcpAcceptor;
+// protected ExecutorService ioExecutor;
+// protected ExecutorService logicExecutor;
- public ApacheDS()
+ public ApacheDS( DirectoryService directoryService, LdapServer ldapServer, LdapServer ldapsServer )
{
- ldapServer.setEnabled( true );
+ this.directoryService = directoryService == null? new DefaultDirectoryService(): directoryService;
+ this.ldapServer = ldapServer;
+ this.ldapsServer = ldapsServer;
+// ldapServer.setEnabled( true );
ByteBuffer.setAllocator( new SimpleByteBufferAllocator() );
ByteBuffer.setUseDirectBuffers( false );
- ioExecutor = Executors.newCachedThreadPool();
- logicExecutor = Executors.newFixedThreadPool( maxThreads );
- tcpAcceptor = new SocketAcceptor( Runtime.getRuntime().availableProcessors(), ioExecutor );
- tcpAcceptor.getFilterChain().addLast( "executor", new ExecutorFilter( logicExecutor ) );
+// ioExecutor = Executors.newCachedThreadPool();
+// logicExecutor = Executors.newFixedThreadPool( maxThreads );
+// tcpAcceptor = new SocketAcceptor( Runtime.getRuntime().availableProcessors(), ioExecutor );
+// tcpAcceptor.getFilterChain().addLast( "executor", new ExecutorFilter( logicExecutor ) );
}
@@ -113,6 +108,7 @@
directoryService.startup();
}
+/*
if ( ldapServer == null )
{
ldapServer = new LdapServer( tcpAcceptor );
@@ -132,17 +128,20 @@
{
ldapsServer.start();
}
+*/
}
public boolean isStarted()
{
- return ldapServer.isStarted() || ldapsServer.isStarted();
+ return true;
+// return ldapServer.isStarted() || ldapsServer.isStarted();
}
public void shutdown() throws NamingException
{
+/*
if ( ldapServer.isStarted() )
{
ldapServer.stop();
@@ -180,6 +179,7 @@
LOG.error( "Failed to terminate io executor", e );
}
}
+*/
directoryService.shutdown();
}
@@ -191,10 +191,12 @@
}
+/*
public void setLdapServer( LdapServer ldapServer )
{
this.ldapServer = ldapServer;
}
+*/
public LdapServer getLdapsServer()
@@ -203,10 +205,12 @@
}
+/*
public void setLdapsServer( LdapServer ldapsServer )
{
this.ldapsServer = ldapsServer;
}
+*/
public DirectoryService getDirectoryService()
{
@@ -214,26 +218,12 @@
}
+/*
public void setDirectoryService( DirectoryService directoryService )
{
this.directoryService = directoryService;
}
-
-
- public int getMaxThreads()
- {
- return maxThreads;
- }
-
-
- public void setMaxThreads( int maxThreads )
- {
- this.maxThreads = maxThreads;
- if ( maxThreads < 1 )
- {
- throw new IllegalArgumentException( "Number of max threads should be greater than 0" );
- }
- }
+*/
public long getSynchPeriodMillis()
@@ -280,8 +270,14 @@
public void setAllowAnonymousAccess( boolean allowAnonymousAccess )
{
this.directoryService.setAllowAnonymousAccess( allowAnonymousAccess );
- this.ldapServer.setAllowAnonymousAccess( allowAnonymousAccess );
- this.ldapsServer.setAllowAnonymousAccess( allowAnonymousAccess );
+ if ( ldapServer != null )
+ {
+ this.ldapServer.setAllowAnonymousAccess( allowAnonymousAccess );
+ }
+ if ( ldapsServer != null )
+ {
+ this.ldapsServer.setAllowAnonymousAccess( allowAnonymousAccess );
+ }
}
@@ -303,10 +299,12 @@
this.ldifFilters.addAll( filters );
}
+/*
public IoAcceptor getTcpAcceptor()
{
return tcpAcceptor;
}
+*/
// ----------------------------------------------------------------------
// From ServerContextFactory: presently in intermediate step but these
@@ -413,7 +411,8 @@
//noinspection unchecked
Hashtable<String, Object> env = ( Hashtable<String, Object> ) environment.clone();
env.put( Context.PROVIDER_URL, "" );
- env.put( ApacheDS.JNDI_KEY, this );
+// env.put( ApacheDS.JNDI_KEY, this );
+ env.put( DirectoryService.JNDI_KEY, directoryService );
env.put( Context.INITIAL_CONTEXT_FACTORY, ServerContextFactory.class.getName() );
DirContext root = new InitialDirContext( env );
Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java (original)
+++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java Fri Oct 12 15:09:40 2007
@@ -40,6 +40,7 @@
*/
public class ServerContextFactory extends CoreContextFactory
{
+/*
public final synchronized Context getInitialContext( Hashtable env ) throws NamingException
{
Hashtable<String,Object> cloned = new Hashtable<String,Object>();
@@ -55,4 +56,5 @@
cloned.put( DirectoryService.JNDI_KEY, apacheDS.getDirectoryService() );
return super.getInitialContext( cloned );
}
+*/
}
Modified: directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java Fri Oct 12 15:09:40 2007
@@ -24,6 +24,10 @@
import org.apache.commons.io.FileUtils;
import org.apache.directory.server.configuration.ApacheDS;
import org.apache.directory.server.jndi.ServerContextFactory;
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.DefaultDirectoryService;
+import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.protocol.shared.SocketAcceptor;
import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
import org.apache.directory.shared.ldap.ldif.Entry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
@@ -82,7 +86,7 @@
protected static final String USER = "uid=admin,ou=system";
protected static final String PASSWORD = "secret";
protected static final String BASE = "dc=example,dc=com";
- protected static ApacheDS apacheDS = new ApacheDS();
+ protected static ApacheDS apacheDS;
/**
@@ -200,14 +204,18 @@
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
- doDelete( apacheDS.getDirectoryService().getWorkingDirectory() );
+ DirectoryService directoryService = new DefaultDirectoryService();
+ doDelete( directoryService.getWorkingDirectory() );
port = AvailablePortFinder.getNextAvailable( 1024 );
- apacheDS.getLdapServer().setIpPort( port );
- apacheDS.getDirectoryService().setShutdownHookEnabled( false );
+ SocketAcceptor socketAcceptor = new SocketAcceptor( null );
+ LdapServer ldapServer = new LdapServer( socketAcceptor, directoryService );
+ ldapServer.setIpPort( port );
+ directoryService.setShutdownHookEnabled( false );
+ apacheDS = new ApacheDS( directoryService, ldapServer, null );
apacheDS.startup();
-
+
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( ApacheDS.JNDI_KEY, apacheDS );
+ env.put( DirectoryService.JNDI_KEY, directoryService );
env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
env.put( Context.SECURITY_CREDENTIALS, "secret" );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -317,7 +325,6 @@
root = null;
doDelete( apacheDS.getDirectoryService().getWorkingDirectory() );
- apacheDS = new ApacheDS();
}
Modified: directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java Fri Oct 12 15:09:40 2007
@@ -20,11 +20,31 @@
package org.apache.directory.server.unit;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
import org.apache.commons.io.FileUtils;
-import org.apache.directory.server.configuration.ApacheDS;
+import org.apache.directory.server.core.DefaultDirectoryService;
+import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.jndi.ServerContextFactory;
+import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.protocol.shared.SocketAcceptor;
import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
import org.apache.directory.shared.ldap.ldif.Entry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
@@ -33,16 +53,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.naming.*;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.ldap.InitialLdapContext;
-import javax.naming.ldap.LdapContext;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-
/**
* A simple testcase for testing JNDI provider functionality.
@@ -68,16 +78,18 @@
/** flag whether to delete database files for each test or not */
protected boolean doDelete = true;
- protected ApacheDS apacheDS = new ApacheDS();
+// protected ApacheDS apacheDS = new ApacheDS();
protected int port = -1;
private static int start;
private static long t0;
protected static int nbTests = 10000;
-
+ protected DirectoryService directoryService;
+ protected SocketAcceptor socketAcceptor;
+ protected LdapServer ldapServer;
+
-
/**
* If there is an LDIF file with the same name as the test class
* but with the .ldif extension then it is read and the entries
@@ -97,10 +109,10 @@
return EMPTY_LIST;
}
- if ( ! apacheDS.isStarted() )
- {
- throw new ConfigurationException( "The server has not been started - cannot add entries." );
- }
+// if ( ! apacheDS.isStarted() )
+// {
+// throw new ConfigurationException( "The server has not been started - cannot add entries." );
+// }
LdifReader ldifReader = new LdifReader( in );
List<Entry> entries = new ArrayList<Entry>();
@@ -184,10 +196,10 @@
*/
protected LdapContext getWiredContext( String bindPrincipalDn, String password ) throws NamingException
{
- if ( ! apacheDS.isStarted() )
- {
- throw new ConfigurationException( "The server is not online! Cannot connect to it." );
- }
+// if ( ! apacheDS.isStarted() )
+// {
+// throw new ConfigurationException( "The server is not online! Cannot connect to it." );
+// }
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, CTX_FACTORY );
@@ -215,23 +227,30 @@
}
start++;
-
- doDelete( apacheDS.getDirectoryService().getWorkingDirectory() );
+ directoryService = new DefaultDirectoryService();
+ directoryService.setShutdownHookEnabled( false );
+ doDelete( directoryService.getWorkingDirectory() );
+ configureDirectoryService();
+ directoryService.startup();
port = AvailablePortFinder.getNextAvailable( 1024 );
- apacheDS.getLdapServer().setIpPort( port );
- apacheDS.getDirectoryService().setShutdownHookEnabled( false );
- apacheDS.startup();
-
- try
- {
- setContexts( "uid=admin,ou=system", "secret" );
- }
- catch( Exception e )
- {
- throw e;
- }
+
+ socketAcceptor = new SocketAcceptor( null );
+ ldapServer = new LdapServer( socketAcceptor, directoryService );
+ ldapServer.setIpPort( port );
+ ldapServer.start();
+
+ setContexts( "uid=admin,ou=system", "secret" );
}
+ protected void configureDirectoryService()
+ {
+ }
+
+ protected void setAllowAnonymousAccess( boolean anonymousAccess )
+ {
+ directoryService.setAllowAnonymousAccess( anonymousAccess );
+ ldapServer.setAllowAnonymousAccess( anonymousAccess );
+ }
/**
* Deletes the Eve working directory.
@@ -267,7 +286,7 @@
protected void setContexts( String user, String passwd ) throws NamingException
{
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( ApacheDS.JNDI_KEY, apacheDS );
+ env.put( DirectoryService.JNDI_KEY, directoryService );
env.put( Context.SECURITY_PRINCIPAL, user );
env.put( Context.SECURITY_CREDENTIALS, passwd );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -305,10 +324,10 @@
protected void tearDown() throws Exception
{
super.tearDown();
-
+ ldapServer.stop();
try
{
- apacheDS.shutdown();
+ directoryService.shutdown();
}
catch ( Exception e )
{
@@ -316,7 +335,7 @@
}
sysRoot = null;
- apacheDS = new ApacheDS();
+// apacheDS = new ApacheDS();
if ( start >= nbTests )
{
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java Fri Oct 12 15:09:40 2007
@@ -96,7 +96,7 @@
systemEntry.put( "uid", "testUid" );
systemCfg.setContextEntry( systemEntry );
- apacheDS.getDirectoryService().setSystemPartition( systemCfg );
+ directoryService.setSystemPartition( systemCfg );
super.setUp();
super.loadTestLdif( true );
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java Fri Oct 12 15:09:40 2007
@@ -34,7 +34,6 @@
import org.apache.directory.shared.ldap.message.AttributeImpl;
import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.message.ModificationItemImpl;
-import org.apache.mina.util.AvailablePortFinder;
import javax.crypto.spec.DESKeySpec;
import javax.naming.Context;
@@ -69,48 +68,16 @@
*/
public void setUp() throws Exception
{
- apacheDS.setAllowAnonymousAccess( false );
+ super.setUp();
+// setAllowAnonymousAccess( false );
Attributes attrs;
- Set<Partition> partitions = new HashSet<Partition>();
-
- JdbmPartition partition;
-
- // Add partition 'example'
- partition = new JdbmPartition();
- partition.setId( "example" );
- partition.setSuffix( "dc=example,dc=com" );
-
- Set<Index> indexedAttrs = new HashSet<Index>();
- indexedAttrs.add( new JdbmIndex( "ou" ) );
- indexedAttrs.add( new JdbmIndex( "dc" ) );
- indexedAttrs.add( new JdbmIndex( "objectClass" ) );
- partition.setIndexedAttributes( indexedAttrs );
-
- attrs = new AttributesImpl( true );
- Attribute attr = new AttributeImpl( "objectClass" );
- attr.add( "top" );
- attr.add( "domain" );
- attrs.put( attr );
- attr = new AttributeImpl( "dc" );
- attr.add( "example" );
- attrs.put( attr );
- partition.setContextEntry( attrs );
-
- partitions.add( partition );
- apacheDS.getDirectoryService().setPartitions( partitions );
-
- List<Interceptor> list = apacheDS.getDirectoryService().getInterceptors();
- list.add( new KeyDerivationInterceptor() );
- apacheDS.getDirectoryService().setInterceptors( list );
-
- doDelete( apacheDS.getDirectoryService().getWorkingDirectory() );
- port = AvailablePortFinder.getNextAvailable( 1024 );
- apacheDS.getLdapServer().setIpPort( port );
- apacheDS.getDirectoryService().setShutdownHookEnabled( false );
+// doDelete( directoryService.getWorkingDirectory() );
+// port = AvailablePortFinder.getNextAvailable( 1024 );
+// ldapServer.setIpPort( port );
+// directoryService.setShutdownHookEnabled( false );
- super.setUp();
setContexts( "uid=admin,ou=system", "secret" );
@@ -135,19 +102,59 @@
schemaRoot.modifyAttributes( "cn=Krb5kdc", mods );
}
+/*
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
env.put( "java.naming.provider.url", "ldap://localhost:" + port + "/dc=example,dc=com" );
env.put( "java.naming.security.principal", "uid=admin,ou=system" );
env.put( "java.naming.security.credentials", "secret" );
env.put( "java.naming.security.authentication", "simple" );
- ctx = new InitialDirContext( env );
+*/
+ ctx = directoryService.getJndiContext( "dc=example,dc=com" );
+// new InitialDirContext( env );
attrs = getOrgUnitAttributes( "users" );
DirContext users = ctx.createSubcontext( "ou=users", attrs );
attrs = getPersonAttributes( "Nelson", "Horatio Nelson", "hnelson", "secret", "hnelson@EXAMPLE.COM" );
users.createSubcontext( "uid=hnelson", attrs );
+ }
+
+ protected void configureDirectoryService()
+ {
+ Attributes attrs;
+ Set<Partition> partitions = new HashSet<Partition>();
+
+ JdbmPartition partition;
+
+ // Add partition 'example'
+ partition = new JdbmPartition();
+ partition.setId( "example" );
+ partition.setSuffix( "dc=example,dc=com" );
+
+ Set<Index> indexedAttrs = new HashSet<Index>();
+ indexedAttrs.add( new JdbmIndex( "ou" ) );
+ indexedAttrs.add( new JdbmIndex( "dc" ) );
+ indexedAttrs.add( new JdbmIndex( "objectClass" ) );
+ partition.setIndexedAttributes( indexedAttrs );
+
+ attrs = new AttributesImpl( true );
+ Attribute attr = new AttributeImpl( "objectClass" );
+ attr.add( "top" );
+ attr.add( "domain" );
+ attrs.put( attr );
+ attr = new AttributeImpl( "dc" );
+ attr.add( "example" );
+ attrs.put( attr );
+ partition.setContextEntry( attrs );
+
+ partitions.add( partition );
+ directoryService.setPartitions( partitions );
+
+ List<Interceptor> list = directoryService.getInterceptors();
+
+ list.add( new KeyDerivationInterceptor() );
+ directoryService.setInterceptors( list );
}
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java Fri Oct 12 15:09:40 2007
@@ -72,16 +72,16 @@
if ( this.getName().equals( "testDisableAnonymousBinds" ) ||
this.getName().equals( "testCompareWithoutAuthentication" ) )
{
- apacheDS.setAllowAnonymousAccess( false );
+ setAllowAnonymousAccess( false );
}
else if ( this.getName().equals( "testEnableAnonymousBindsOnRootDSE" ) )
{
- apacheDS.setAllowAnonymousAccess( false );
+ setAllowAnonymousAccess( false );
}
else if ( this.getName().equals( "testUserAuthOnMixedCaseSuffix" ) )
{
Set<Partition> partitions = new HashSet<Partition>();
- partitions.addAll( apacheDS.getDirectoryService().getPartitions() );
+ partitions.addAll( directoryService.getPartitions() );
JdbmPartition partition = new JdbmPartition();
partition.setSuffix( "dc=aPache,dc=org" );
Attributes entry = new AttributesImpl( "dc", "aPache", true );
@@ -95,16 +95,16 @@
indexedAttributes.add( new JdbmIndex( "dc" ) );
partition.setIndexedAttributes( indexedAttributes );
partitions.add( partition );
- apacheDS.getDirectoryService().setPartitions( partitions );
+ directoryService.setPartitions( partitions );
}
else if ( this.getName().equals( "testAnonymousBindsEnabledBaseSearch" ) )
{
// allow anonymous access
- apacheDS.setAllowAnonymousAccess( true );
+ setAllowAnonymousAccess( true );
// create a partition to search
Set partitions = new HashSet();
- partitions.addAll( apacheDS.getDirectoryService().getPartitions() );
+ partitions.addAll( directoryService.getPartitions() );
JdbmPartition partition = new JdbmPartition();
partition.setSuffix( "dc=apache,dc=org" );
Attributes entry = new AttributesImpl( "dc", "apache", true );
@@ -118,7 +118,7 @@
indexedAttributes.add( new JdbmIndex( "dc" ) );
partition.setIndexedAttributes( indexedAttributes );
partitions.add( partition );
- apacheDS.getDirectoryService().setPartitions( partitions );
+ directoryService.setPartitions( partitions );
}
super.setUp();
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java Fri Oct 12 15:09:40 2007
@@ -20,7 +20,18 @@
package org.apache.directory.server;
-import org.apache.directory.server.core.partition.Partition;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.LdapContext;
+
import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.server.core.partition.impl.btree.Index;
import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
@@ -33,17 +44,6 @@
import org.apache.directory.shared.ldap.util.DateUtils;
import org.apache.directory.shared.ldap.util.NamespaceTools;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.naming.ldap.LdapContext;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
/**
* A set of tests to make sure the negation operator is working
@@ -94,7 +94,7 @@
NamespaceTools.getRdnValue( PartitionNexus.SYSTEM_PARTITION_SUFFIX ) );
system.setContextEntry( systemEntry );
- apacheDS.getDirectoryService().setSystemPartition( system );
+ directoryService.setSystemPartition( system );
}
super.setUp();
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java Fri Oct 12 15:09:40 2007
@@ -59,7 +59,7 @@
*/
public void setUp() throws Exception
{
- apacheDS.setAllowAnonymousAccess( false );
+ setAllowAnonymousAccess( false );
Attributes attrs;
Set<Partition> partitions = new HashSet<Partition>();
@@ -86,12 +86,12 @@
partition.setContextEntry( attrs );
partitions.add( partition );
- apacheDS.getDirectoryService().setPartitions( partitions );
+ directoryService.setPartitions( partitions );
- List<Interceptor> list = apacheDS.getDirectoryService().getInterceptors();
+ List<Interceptor> list = directoryService.getInterceptors();
list.add( new PasswordPolicyInterceptor() );
- apacheDS.getDirectoryService().setInterceptors( list );
+ directoryService.setInterceptors( list );
super.setUp();
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java Fri Oct 12 15:09:40 2007
@@ -58,8 +58,8 @@
*/
public void setUp() throws Exception
{
- apacheDS.setAllowAnonymousAccess( false );
- apacheDS.getLdapServer().setSaslHost( "localhost" );
+ setAllowAnonymousAccess( false );
+ ldapServer.setSaslHost( "localhost" );
Set<Partition> partitions = new HashSet<Partition>();
JdbmPartition partition = new JdbmPartition();
@@ -83,7 +83,7 @@
partition.setContextEntry( attrs );
partitions.add( partition );
- apacheDS.getDirectoryService().setPartitions( partitions );
+ directoryService.setPartitions( partitions );
super.setUp();
Hashtable<String, String> env = new Hashtable<String, String>();
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/StoredProcedureExecutionITest.java Fri Oct 12 15:09:40 2007
@@ -21,7 +21,6 @@
import org.apache.directory.server.ldap.ExtendedOperationHandler;
-import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler;
import org.apache.directory.server.unit.AbstractServerTest;
import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -54,10 +53,9 @@
/////////////////////////////////////////////////////////
// Enable the Stored Procedure Extended Operation Handler
/////////////////////////////////////////////////////////
- LdapServer ldapCfg = super.apacheDS.getLdapServer();
- Set<ExtendedOperationHandler> handlers = new HashSet<ExtendedOperationHandler>( ldapCfg.getExtendedOperationHandlers() );
+ Set<ExtendedOperationHandler> handlers = new HashSet<ExtendedOperationHandler>( ldapServer.getExtendedOperationHandlers() );
handlers.add( new StoredProcedureExtendedOperationHandler() );
- ldapCfg.setExtendedOperationHandlers( handlers );
+ ldapServer.setExtendedOperationHandlers( handlers );
super.setUp();
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java Fri Oct 12 15:09:40 2007
@@ -56,11 +56,14 @@
*/
public void setUp() throws Exception
{
- doDelete( apacheDS.getDirectoryService().getWorkingDirectory() );
+ doDelete = false;
+ super.setUp();
+ doDelete = true;
+ doDelete( directoryService.getWorkingDirectory() );
int ldapsPort = AvailablePortFinder.getNextAvailable( 8192 );
- LdapServer ldapsServer = apacheDS.getLdapsServer();
+ LdapServer ldapsServer = new LdapServer( socketAcceptor, directoryService );
ldapsServer.setEnableLdaps( true );
ldapsServer.setLdapsCertificatePassword( "boguspw" );
ldapsServer.setIpPort( ldapsPort );
@@ -84,9 +87,6 @@
in.close();
out.close();
- doDelete = false;
- super.setUp();
- doDelete = true;
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
Modified: directory/apacheds/branches/bigbang/server-xml/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-xml/pom.xml?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-xml/pom.xml (original)
+++ directory/apacheds/branches/bigbang/server-xml/pom.xml Fri Oct 12 15:09:40 2007
@@ -40,6 +40,37 @@
<dependency>
<groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-protocol-changepw</artifactId>
+ <version>${pom.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-protocol-kerberos</artifactId>
+ <version>${pom.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-protocol-dns</artifactId>
+ <version>${pom.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-protocol-ldap</artifactId>
+ <version>${pom.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-protocol-ntp</artifactId>
+ <version>${pom.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-bootstrap-partition</artifactId>
<version>${version}</version>
<scope>test</scope>
Modified: directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml?rev=584293&r1=584292&r2=584293&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml (original)
+++ directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml Fri Oct 12 15:09:40 2007
@@ -1,175 +1,195 @@
<?xml version="1.0" encoding="UTF-8"?>
-<spring:beans xmlns:spring="http://xbean.apache.org/schemas/spring/1.0">
- <apacheDS id="apacheDS" xmlns="http://apacheds.org/config/1.0"
- synchPeriodMillis="15000"
- maxThreads="8"
- allowAnonymousAccess="false">
-
- <directoryService>
- <defaultDirectoryService id="directoryService" instanceId="default"
- workingDirectory="example.com"
- allowAnonymousAccess="false"
- accessControlEnabled="false"
- denormalizeOpAttrsEnabled="false">
- <systemPartition>
- <!-- use the following partitionConfiguration to override defaults for -->
- <!-- the system partition -->
- <jdbmPartition id="system" cacheSize="100" suffix="ou=system" optimizerEnabled="true" syncOnWrite="true">
- <indexedAttributes>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
- <jdbmIndex attributeId="ou" cacheSize="100"/>
- <jdbmIndex attributeId="uid" cacheSize="100"/>
- <jdbmIndex attributeId="objectClass" cacheSize="100"/>
- </indexedAttributes>
- <contextEntry>
- <value xmlns="http://www.springframework.org/schema/beans">
- objectClass: top
- objectClass: organizationalUnit
- objectClass: extensibleObject
- ou: system
- </value>
- </contextEntry>
- </jdbmPartition>
- </systemPartition>
-
- <partitions>
- <!-- NOTE: when specifying new partitions you need not include those -->
- <!-- attributes below with OID's which are the system indices, if left -->
- <!-- out they will be automatically configured for you with defaults. -->
- <jdbmPartition id="example" cacheSize="100" suffix="dc=example,dc=com" optimizerEnabled="true"
- syncOnWrite="true">
- <indexedAttributes>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
- <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
- <jdbmIndex attributeId="dc" cacheSize="100"/>
- <jdbmIndex attributeId="ou" cacheSize="100"/>
- <jdbmIndex attributeId="krb5PrincipalName" cacheSize="100"/>
- <jdbmIndex attributeId="uid" cacheSize="100"/>
- <jdbmIndex attributeId="objectClass" cacheSize="100"/>
- </indexedAttributes>
- <contextEntry>
- <value xmlns="http://www.springframework.org/schema/beans">
- objectClass: top
- objectClass: domain
- objectClass: extensibleObject
- dc: example
- </value>
- </contextEntry>
- </jdbmPartition>
- </partitions>
-
- <interceptors>
- <normalizationInterceptor/>
- <authenticationInterceptor/>
- <referralInterceptor/>
- <aciAuthorizationInterceptor/>
- <defaultAuthorizationInterceptor/>
- <exceptionInterceptor/>
- <operationalAttributeInterceptor/>
-
- <!-- Uncomment to enable the password policy interceptor
- <passwordPolicyInterceptor/>
- <keyDerivationInterceptor/>
- -->
-
- <schemaInterceptor/>
- <subentryInterceptor/>
- <collectiveAttributeInterceptor/>
- <eventInterceptor/>
- <triggerInterceptor/>
-
- <!-- Uncomment to enable replication interceptor
- <replicationInterceptor>
- <configuration>
- <replicationConfiguration serverPort="10390" peerReplicas="instance_b@localhost:10392">
- <replicaId>
- <replicaId id="instance_a"/>
- </replicaId>
- </replicationConfiguration>
- </configuration>
- </replicationInterceptor>
- -->
- </interceptors>
- </defaultDirectoryService>
- </directoryService>
-
- <ldapsConfiguration>
- <ldapConfiguration enabled="false" ipPort="636" enableLdaps="true"/>
- </ldapsConfiguration>
-
- <ldapConfiguration>
- <ldapConfiguration ipPort="10389" allowAnonymousAccess="false" saslHost="ldap.example.com"
- saslPrincipal="ldap/ldap.example.com@EXAMPLE.COM" searchBaseDn="ou=users,ou=system"
- maxTimeLimit="15000" maxSizeLimit="1000">
- <!-- The list of supported authentication mechanisms. -->
- <supportedMechanisms>
- <value xmlns="http://www.springframework.org/schema/beans">SIMPLE</value>
- <value xmlns="http://www.springframework.org/schema/beans">CRAM-MD5</value>
- <value xmlns="http://www.springframework.org/schema/beans">DIGEST-MD5</value>
- <!--<value xmlns="http://www.springframework.org/schema/beans">GSSAPI</value>-->
- </supportedMechanisms>
-
- <!-- The desired quality-of-protection, used by DIGEST-MD5 and GSSAPI. -->
- <saslQop>
- <value xmlns="http://www.springframework.org/schema/beans">auth</value>
- <value xmlns="http://www.springframework.org/schema/beans">auth-int</value>
- <value xmlns="http://www.springframework.org/schema/beans">auth-conf</value>
- </saslQop>
-
- <!-- The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. -->
- <saslRealms>
- <value xmlns="http://www.springframework.org/schema/beans">example.com</value>
- <value xmlns="http://www.springframework.org/schema/beans">apache.org</value>
- </saslRealms>
-
- <!-- the collection of extended operation handlers to install -->
- <extendedOperationHandlers>
- <!--startTlsHandler/-->
- <gracefulShutdownHandler/>
- <launchDiagnosticUiHandler/>
- <!-- The Stored Procedure Extended Operation is not stable yet and it may cause security risks.-->
- <!--storedProcedureExtendedOperationHandler/-->
- </extendedOperationHandlers>
- </ldapConfiguration>
- </ldapConfiguration>
- </apacheDS>
+<spring:beans xmlns:spring="http://xbean.apache.org/schemas/spring/1.0" xmlns="http://apacheds.org/config/1.0">
- <standardThreadPool maxThreads="8"/>
- <datagramAcceptor executor="#standardThreadPool"/>
- <socketAcceptor executor="#standardThreadPool"/>
+ <defaultDirectoryService id="directoryService" instanceId="default"
+ workingDirectory="example.com"
+ allowAnonymousAccess="true"
+ accessControlEnabled="false"
+ denormalizeOpAttrsEnabled="false">
+ <systemPartition>
+ <!-- use the following partitionConfiguration to override defaults for -->
+ <!-- the system partition -->
+ <jdbmPartition id="system" cacheSize="100" suffix="ou=system" optimizerEnabled="true" syncOnWrite="true">
+ <indexedAttributes>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
+ <jdbmIndex attributeId="ou" cacheSize="100"/>
+ <jdbmIndex attributeId="uid" cacheSize="100"/>
+ <jdbmIndex attributeId="objectClass" cacheSize="100"/>
+ </indexedAttributes>
+ <contextEntry>
+ <value xmlns="http://www.springframework.org/schema/beans">
+ objectClass: top
+ objectClass: organizationalUnit
+ objectClass: extensibleObject
+ ou: system
+ </value>
+ </contextEntry>
+ </jdbmPartition>
+ </systemPartition>
+
+ <partitions>
+ <!-- NOTE: when specifying new partitions you need not include those -->
+ <!-- attributes below with OID's which are the system indices, if left -->
+ <!-- out they will be automatically configured for you with defaults. -->
+ <jdbmPartition id="example" cacheSize="100" suffix="dc=example,dc=com" optimizerEnabled="true"
+ syncOnWrite="true">
+ <indexedAttributes>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
+ <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
+ <jdbmIndex attributeId="dc" cacheSize="100"/>
+ <jdbmIndex attributeId="ou" cacheSize="100"/>
+ <jdbmIndex attributeId="krb5PrincipalName" cacheSize="100"/>
+ <jdbmIndex attributeId="uid" cacheSize="100"/>
+ <jdbmIndex attributeId="objectClass" cacheSize="100"/>
+ </indexedAttributes>
+ <contextEntry>
+ <value xmlns="http://www.springframework.org/schema/beans">
+ objectClass: top
+ objectClass: domain
+ objectClass: extensibleObject
+ dc: example
+ </value>
+ </contextEntry>
+ </jdbmPartition>
+ </partitions>
+
+ <interceptors>
+ <normalizationInterceptor/>
+ <authenticationInterceptor/>
+ <referralInterceptor/>
+ <aciAuthorizationInterceptor/>
+ <defaultAuthorizationInterceptor/>
+ <exceptionInterceptor/>
+ <operationalAttributeInterceptor/>
+
+ <!-- Uncomment to enable the password policy interceptor
+ <passwordPolicyInterceptor/>
+ <keyDerivationInterceptor/>
+ -->
+
+ <schemaInterceptor/>
+ <subentryInterceptor/>
+ <collectiveAttributeInterceptor/>
+ <eventInterceptor/>
+ <triggerInterceptor/>
+
+ <!-- Uncomment to enable replication interceptor
+ <replicationInterceptor>
+ <configuration>
+ <replicationConfiguration serverPort="10390" peerReplicas="instance_b@localhost:10392">
+ <replicaId>
+ <replicaId id="instance_a"/>
+ </replicaId>
+ </replicationConfiguration>
+ </configuration>
+ </replicationInterceptor>
+ -->
+ </interceptors>
+ </defaultDirectoryService>
+
+ <standardThreadPool id="standardThreadPool" maxThreads="8"/>
+ <datagramAcceptor id="datagramAcceptor" logicExecutor="#standardThreadPool"/>
+ <socketAcceptor id="socketAcceptor" logicExecutor="#standardThreadPool"/>
- <changePasswordServer ipPort="80464">
+<!-- missing atou=users,dc=example,dc=com
+ <changePasswordServer ipPort="60464">
<directoryService>#directoryService</directoryService>
<datagramAcceptor>#datagramAcceptor</datagramAcceptor>
<socketAcceptor>#socketAcceptor</socketAcceptor>
</changePasswordServer>
- <kdcServer ipPort="80088">
+-->
+<!-- missing atou=users,dc=example,dc=com
+ <kdcServer ipPort="60088">
<directoryService>#directoryService</directoryService>
<datagramAcceptor>#datagramAcceptor</datagramAcceptor>
<socketAcceptor>#socketAcceptor</socketAcceptor>
</kdcServer>
- <ntpServer ipPort="80123">
+-->
+ <ntpServer ipPort="60123">
<datagramAcceptor>#datagramAcceptor</datagramAcceptor>
<socketAcceptor>#socketAcceptor</socketAcceptor>
</ntpServer>
+<!-- missing atou=users,dc=example,dc=com
<dnsServer ipPort="8053">
<directoryService>#directoryService</directoryService>
<datagramAcceptor>#datagramAcceptor</datagramAcceptor>
<socketAcceptor>#socketAcceptor</socketAcceptor>
</dnsServer>
+-->
+
+<!-- no certificate -->
+ <ldapServer id="ldapsServer"
+ enabled="false"
+ ipPort="60636"
+ enableLdaps="true">
+ <directoryService>#directoryService</directoryService>
+ <socketAcceptor>#socketAcceptor</socketAcceptor>
+ </ldapServer>
+
+ <ldapServer id="ldapServer"
+ ipPort="10389"
+ allowAnonymousAccess="false"
+ saslHost="ldap.example.com"
+ saslPrincipal="ldap/ldap.example.com@EXAMPLE.COM"
+ searchBaseDn="ou=users,ou=system"
+ maxTimeLimit="15000"
+ maxSizeLimit="1000">
+
+ <directoryService>#directoryService</directoryService>
+ <socketAcceptor>#socketAcceptor</socketAcceptor>
+ <!-- The list of supported authentication mechanisms. -->
+ <supportedMechanisms>
+ <value xmlns="http://www.springframework.org/schema/beans">SIMPLE</value>
+ <value xmlns="http://www.springframework.org/schema/beans">CRAM-MD5</value>
+ <value xmlns="http://www.springframework.org/schema/beans">DIGEST-MD5</value>
+ <!--<value xmlns="http://www.springframework.org/schema/beans">GSSAPI</value>-->
+ </supportedMechanisms>
+
+ <!-- The desired quality-of-protection, used by DIGEST-MD5 and GSSAPI. -->
+ <saslQop>
+ <value xmlns="http://www.springframework.org/schema/beans">auth</value>
+ <value xmlns="http://www.springframework.org/schema/beans">auth-int</value>
+ <value xmlns="http://www.springframework.org/schema/beans">auth-conf</value>
+ </saslQop>
+
+ <!-- The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. -->
+ <saslRealms>
+ <value xmlns="http://www.springframework.org/schema/beans">example.com</value>
+ <value xmlns="http://www.springframework.org/schema/beans">apache.org</value>
+ </saslRealms>
+
+ <!-- the collection of extended operation handlers to install -->
+ <extendedOperationHandlers>
+ <!--startTlsHandler/-->
+ <gracefulShutdownHandler/>
+ <launchDiagnosticUiHandler/>
+ <!-- The Stored Procedure Extended Operation is not stable yet and it may cause security risks.-->
+ <!--storedProcedureExtendedOperationHandler/-->
+ </extendedOperationHandlers>
+ </ldapServer>
+
+
+ <apacheDS id="apacheDS"
+ synchPeriodMillis="15000"
+ allowAnonymousAccess="false">
+
+ <directoryService>#directoryService</directoryService>
+ <ldapServer>#ldapServer</ldapServer>
+ <ldapsServer>#ldapsServer</ldapsServer>
+ </apacheDS>
<!-- another bean I didn't convert -->
<spring:bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">