@CreateLdapServer(transports = { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") })
/** * Create a new ManagedCreateTransport. * * @param createLdapServer */ public ManagedCreateTransport(final CreateTransport original) { protocol = original.protocol(); type = original.type(); port = original.port(); address = original.address(); backlog = original.backlog(); ssl = original.ssl(); nbThreads = original.nbThreads(); }
/** * Create a new ManagedCreateLdapServer. * * @param createLdapServer */ public ManagedCreateLdapServer(CreateLdapServer createLdapServer) { name = createLdapServer.name(); transports = createLdapServer.transports(); factory = createLdapServer.factory(); maxSizeLimit = createLdapServer.maxSizeLimit(); maxTimeLimit = createLdapServer.maxTimeLimit(); allowAnonymousAccess = createLdapServer.allowAnonymousAccess(); keyStore = createLdapServer.keyStore(); certificatePassword = createLdapServer.certificatePassword(); extendedOpHandlers = createLdapServer.extendedOpHandlers(); saslMechanisms = createLdapServer.saslMechanisms(); ntlmProvider = createLdapServer.ntlmProvider(); saslHost = createLdapServer.saslHost(); saslPrincipal = createLdapServer.saslPrincipal(); saslRealms = createLdapServer.saslRealms(); }
/** * Create a replication consumer */ private static ReplicationConsumer createConsumer( CreateConsumer createConsumer ) { ReplicationConsumer consumer = new ReplicationConsumerImpl(); SyncReplConfiguration config = new SyncReplConfiguration(); String remoteHost = createConsumer.remoteHost(); if ( Strings.isEmpty( remoteHost ) ) { remoteHost = Network.LOOPBACK_HOSTNAME; } config.setRemoteHost( remoteHost ); config.setRemotePort( createConsumer.remotePort() ); config.setReplUserDn( createConsumer.replUserDn() ); config.setReplUserPassword( Strings.getBytesUtf8( createConsumer.replUserPassword() ) ); config.setUseTls( createConsumer.useTls() ); config.setBaseDn( createConsumer.baseDn() ); config.setRefreshInterval( createConsumer.refreshInterval() ); consumer.setConfig( config ); return consumer; }
@Override public void evaluate() throws Throwable { LOG.trace( "Creating ldap connection pool" ); Class<? extends PooledObjectFactory<LdapConnection>> factoryClass = createLdapConnectionPool.factoryClass(); Class<? extends LdapConnectionFactory> connectionFactoryClass = createLdapConnectionPool.connectionFactoryClass(); Class<? extends LdapConnectionValidator> validatorClass = createLdapConnectionPool.validatorClass(); ldapConnectionPool = createLdapConnectionPool( getLdapServer(), factoryClass, connectionFactoryClass, validatorClass ); ldapConnectionTemplate = new LdapConnectionTemplate( ldapConnectionPool ); try { base.evaluate(); } finally { LOG.trace( "Closing ldap connection pool" ); ldapConnectionPool.close(); ldapConnectionTemplate = null; } } };
@CreateLdapServer(transports = { @CreateTransport(protocol = "LDAP", port = 7654) }) public class ApimanLdapServer extends AbstractLdapTestUnit {
classCreateLdapConnectionPoolRule.createLdapConnectionPool.factoryClass(); Class<? extends LdapConnectionFactory> connectionFactoryClass = classCreateLdapConnectionPoolRule.createLdapConnectionPool.connectionFactoryClass(); Class<? extends LdapConnectionValidator> validatorClass = classCreateLdapConnectionPoolRule.createLdapConnectionPool.validatorClass(); ldapConnectionPool = classCreateLdapConnectionPoolRule .createLdapConnectionPool( ldapServer, factoryClass,
@RunWith(FrameworkRunner.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP", port = 1024)}) @ApplyLdifFiles("test.ldif") public class LDAPModuleRoleExpansionTest extends AbstractLdapTestUnit {
@CreateLdapServer(transports = { @CreateTransport(protocol = "LDAP", port = 7654) }) public class LdapTestParent extends AbstractLdapTestUnit { @Rule
@RunWith(FrameworkRunner.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP", port = 1024)}) @ApplyLdifFiles("test.ldif") public class LDAPLoginModuleMaskPasswordTest extends AbstractLdapTestUnit {
@RunWith(FrameworkRunner.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP", port = 1024)}) @ApplyLdifFiles("test.ldif") public class LDAPLoginModuleTest extends AbstractLdapTestUnit {
@RunWith(FrameworkRunner.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP", port = 1024)}) @ApplyLdifFiles("AMQauth2.ldif") public class LegacyLDAPSecuritySettingPluginTest2 extends AbstractLdapTestUnit {
@RunWith(FrameworkRunner.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP", port = 1024)}) @ApplyLdifFiles("AMQauth.ldif") public class LegacyLDAPSecuritySettingPluginTest extends AbstractLdapTestUnit {
@RunWith(FrameworkRunner.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP", port = 1024)}) @ApplyLdifFiles("AMQauth.ldif") public class LegacyLDAPSecuritySettingPluginListenerTest extends AbstractLdapTestUnit {
@RunWith(FrameworkRunner.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP", port = 1024)}) @ApplyLdifFiles("test.ldif") public class LDAPSecurityTest extends AbstractLdapTestUnit {
@CreateLdapServer( transports = @CreateTransport(protocol = "LDAP", address= LDAP_SERVER_ADDR), }) @CreateDS(allowAnonAccess = true,
@CreateLdapServer( transports = @CreateTransport(protocol = "LDAP", address= LDAP_SERVER_ADDR), }) @CreateDS(allowAnonAccess = true,
@CreateLdapServer( transports = @CreateTransport(protocol = "LDAP", address = LDAP_SERVER_ADDR), }) @CreateDS(allowAnonAccess = true,
@CreateLdapServer( transports = { @CreateTransport(protocol = "LDAP", address = "localhost")
}) @ApplyLdifFiles("localTest.ldif") @CreateLdapServer( transports = { @CreateTransport(protocol = "LDAP") }) public class JUnitLDAPTestWrapper extends AbstractLdapTestUnit