Package org.keycloak.util.ldap
Class LDAPEmbeddedServer
- java.lang.Object
-
- org.keycloak.util.ldap.LDAPEmbeddedServer
-
public class LDAPEmbeddedServer extends Object
- Author:
- Marek Posolda
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description LDAPEmbeddedServer(Properties defaultProperties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.directory.server.core.api.DirectoryServicecreateDirectoryService()protected org.apache.directory.server.ldap.LdapServercreateLdapServer()static voidexecute(String[] args, Properties defaultProperties)intgetBindLdapsPort()intgetBindPort()voidinit()static voidmain(String[] args)protected StringreadProperty(String propertyName, String defaultValue)protected voidshutdownDirectoryService()voidstart()voidstop()protected voidstopLdapServer()
-
-
-
Field Detail
-
PROPERTY_BASE_DN
public static final String PROPERTY_BASE_DN
- See Also:
- Constant Field Values
-
PROPERTY_BIND_HOST
public static final String PROPERTY_BIND_HOST
- See Also:
- Constant Field Values
-
PROPERTY_BIND_PORT
public static final String PROPERTY_BIND_PORT
- See Also:
- Constant Field Values
-
PROPERTY_BIND_LDAPS_PORT
public static final String PROPERTY_BIND_LDAPS_PORT
- See Also:
- Constant Field Values
-
PROPERTY_LDIF_FILE
public static final String PROPERTY_LDIF_FILE
- See Also:
- Constant Field Values
-
PROPERTY_SASL_PRINCIPAL
public static final String PROPERTY_SASL_PRINCIPAL
- See Also:
- Constant Field Values
-
PROPERTY_DSF
public static final String PROPERTY_DSF
- See Also:
- Constant Field Values
-
PROPERTY_ENABLE_ACCESS_CONTROL
public static final String PROPERTY_ENABLE_ACCESS_CONTROL
- See Also:
- Constant Field Values
-
PROPERTY_ENABLE_ANONYMOUS_ACCESS
public static final String PROPERTY_ENABLE_ANONYMOUS_ACCESS
- See Also:
- Constant Field Values
-
PROPERTY_ENABLE_SSL
public static final String PROPERTY_ENABLE_SSL
- See Also:
- Constant Field Values
-
PROPERTY_ENABLE_STARTTLS
public static final String PROPERTY_ENABLE_STARTTLS
- See Also:
- Constant Field Values
-
PROPERTY_SET_CONFIDENTIALITY_REQUIRED
public static final String PROPERTY_SET_CONFIDENTIALITY_REQUIRED
- See Also:
- Constant Field Values
-
DSF_INMEMORY
public static final String DSF_INMEMORY
- See Also:
- Constant Field Values
-
DSF_FILE
public static final String DSF_FILE
- See Also:
- Constant Field Values
-
DEFAULT_DSF
public static final String DEFAULT_DSF
- See Also:
- Constant Field Values
-
defaultProperties
protected Properties defaultProperties
-
baseDN
protected String baseDN
-
bindHost
protected String bindHost
-
bindPort
protected int bindPort
-
bindLdapsPort
protected int bindLdapsPort
-
ldifFile
protected String ldifFile
-
ldapSaslPrincipal
protected String ldapSaslPrincipal
-
directoryServiceFactory
protected String directoryServiceFactory
-
enableAccessControl
protected boolean enableAccessControl
-
enableAnonymousAccess
protected boolean enableAnonymousAccess
-
enableSSL
protected boolean enableSSL
-
enableStartTLS
protected boolean enableStartTLS
-
setConfidentialityRequired
protected boolean setConfidentialityRequired
-
keystoreFile
protected String keystoreFile
-
certPassword
protected String certPassword
-
directoryService
protected org.apache.directory.server.core.api.DirectoryService directoryService
-
ldapServer
protected org.apache.directory.server.ldap.LdapServer ldapServer
-
-
Constructor Detail
-
LDAPEmbeddedServer
public LDAPEmbeddedServer(Properties defaultProperties)
-
-
Method Detail
-
getBindPort
public int getBindPort()
-
getBindLdapsPort
public int getBindLdapsPort()
-
execute
public static void execute(String[] args, Properties defaultProperties) throws Exception
- Throws:
Exception
-
createDirectoryService
protected org.apache.directory.server.core.api.DirectoryService createDirectoryService() throws Exception- Throws:
Exception
-
createLdapServer
protected org.apache.directory.server.ldap.LdapServer createLdapServer()
-
stopLdapServer
protected void stopLdapServer()
-
-