org.keycloak.testutils

## Class LDAPEmbeddedServer

- java.lang.Object
- - org.picketbox.test.ldap.AbstractLDAPTest
  - - org.keycloak.testutils.LDAPEmbeddedServer

-     public class LDAPEmbeddedServer
      extends org.picketbox.test.ldap.AbstractLDAPTest

  Forked from Picketlink project Abstract base for all LDAP test suites. It handles
  Author:
    Peter Skopek: pskopek at redhat dot com

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `agentDnSuffix`
    `protected String` | `baseDn`
    `protected int` | `batchSizeForSync`
    `protected String` | `bindCredential`
    `protected String` | `bindDn`
    `static String` | `CONNECTION_PROPERTIES`
    `protected boolean` | `connectionPooling`
    `protected String` | `connectionUrl`
    `protected String` | `groupDnSuffix`
    `static String` | `IDM_TEST_LDAP_AGENT_DN_SUFFIX`
    `static String` | `IDM_TEST_LDAP_BASE_DN`
    `static String` | `IDM_TEST_LDAP_BATCH_SIZE_FOR_SYNC`
    `static String` | `IDM_TEST_LDAP_BIND_CREDENTIAL`
    `static String` | `IDM_TEST_LDAP_BIND_DN`
    `static String` | `IDM_TEST_LDAP_CONNECTION_POOLING`
    `static String` | `IDM_TEST_LDAP_CONNECTION_URL`
    `static String` | `IDM_TEST_LDAP_GROUP_DN_SUFFIX`
    `static String` | `IDM_TEST_LDAP_PAGINATION`
    `static String` | `IDM_TEST_LDAP_ROLES_DN_SUFFIX`
    `static String` | `IDM_TEST_LDAP_START_EMBEDDED_LDAP_SERVER`
    `static String` | `IDM_TEST_LDAP_USER_ACCOUNT_CONTROLS_AFTER_PASSWORD_UPDATE`
    `static String` | `IDM_TEST_LDAP_USER_DN_SUFFIX`
    `static String` | `IDM_TEST_LDAP_USER_OBJECT_CLASSES`
    `static String` | `IDM_TEST_LDAP_USERNAME_LDAP_ATTRIBUTE`
    `static String` | `IDM_TEST_LDAP_VENDOR`
    `protected boolean` | `pagination`
    `protected String` | `rolesDnSuffix`
    `protected boolean` | `startEmbeddedLdapLerver`
    `protected boolean` | `userAccountControlsAfterPasswordUpdate`
    `protected String` | `userDnSuffix`
    `protected String` | `usernameLDAPAttribute`
    `protected String` | `userObjectClasses`
    `protected String` | `vendor`

    - ### Fields inherited from class org.picketbox.test.ldap.AbstractLDAPTest

      `adminDN, adminPW, dn, ds, port, serverHost`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LDAPEmbeddedServer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `clearSubContexts(DirContext ctx, Name name)`
    `protected void` | `createBaseDN()`
    `String` | `getAgentDnSuffix()`
    `String` | `getBaseDn()`
    `int` | `getBatchSizeForSync()`
    `String` | `getBindCredential()`
    `String` | `getBindDn()`
    `String` | `getConnectionUrl()`
    `String` | `getGroupDnSuffix()`
    `Map<String,String>` | `getLDAPConfig()`
    `String` | `getRolesDnSuffix()`
    `String` | `getUserDnSuffix()`
    `String` | `getUsernameLDAPAttribute()`
    `String` | `getUserObjectClasses()`
    `String` | `getVendor()`
    `void` | `importLDIF(String fileName)`
    `boolean` | `isConnectionPooling()`
    `boolean` | `isPagination()`
    `boolean` | `isStartEmbeddedLdapLerver()`
    `boolean` | `isUserAccountControlsAfterPasswordUpdate()`
    `protected void` | `loadConnectionProperties()`
    `void` | `setup()`
    `void` | `tearDown()`

    - ### Methods inherited from class org.picketbox.test.ldap.AbstractLDAPTest

      `getAdminPW, recursiveDeleteDir`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CONNECTION_PROPERTIES

          public static final String CONNECTION_PROPERTIES

      See Also:
        Constant Field Values

    - #### connectionUrl

          protected String connectionUrl

    - #### baseDn

          protected String baseDn

    - #### userDnSuffix

          protected String userDnSuffix

    - #### rolesDnSuffix

          protected String rolesDnSuffix

    - #### groupDnSuffix

          protected String groupDnSuffix

    - #### agentDnSuffix

          protected String agentDnSuffix

    - #### startEmbeddedLdapLerver

          protected boolean startEmbeddedLdapLerver

    - #### bindDn

          protected String bindDn

    - #### bindCredential

          protected String bindCredential

    - #### vendor

          protected String vendor

    - #### connectionPooling

          protected boolean connectionPooling

    - #### pagination

          protected boolean pagination

    - #### batchSizeForSync

          protected int batchSizeForSync

    - #### usernameLDAPAttribute

          protected String usernameLDAPAttribute

    - #### userObjectClasses

          protected String userObjectClasses

    - #### userAccountControlsAfterPasswordUpdate

          protected boolean userAccountControlsAfterPasswordUpdate

    - #### IDM_TEST_LDAP_CONNECTION_URL

          public static String IDM_TEST_LDAP_CONNECTION_URL

    - #### IDM_TEST_LDAP_BASE_DN

          public static String IDM_TEST_LDAP_BASE_DN

    - #### IDM_TEST_LDAP_ROLES_DN_SUFFIX

          public static String IDM_TEST_LDAP_ROLES_DN_SUFFIX

    - #### IDM_TEST_LDAP_GROUP_DN_SUFFIX

          public static String IDM_TEST_LDAP_GROUP_DN_SUFFIX

    - #### IDM_TEST_LDAP_USER_DN_SUFFIX

          public static String IDM_TEST_LDAP_USER_DN_SUFFIX

    - #### IDM_TEST_LDAP_AGENT_DN_SUFFIX

          public static String IDM_TEST_LDAP_AGENT_DN_SUFFIX

    - #### IDM_TEST_LDAP_START_EMBEDDED_LDAP_SERVER

          public static String IDM_TEST_LDAP_START_EMBEDDED_LDAP_SERVER

    - #### IDM_TEST_LDAP_BIND_DN

          public static String IDM_TEST_LDAP_BIND_DN

    - #### IDM_TEST_LDAP_BIND_CREDENTIAL

          public static String IDM_TEST_LDAP_BIND_CREDENTIAL

    - #### IDM_TEST_LDAP_VENDOR

          public static String IDM_TEST_LDAP_VENDOR

    - #### IDM_TEST_LDAP_CONNECTION_POOLING

          public static String IDM_TEST_LDAP_CONNECTION_POOLING

    - #### IDM_TEST_LDAP_PAGINATION

          public static String IDM_TEST_LDAP_PAGINATION

    - #### IDM_TEST_LDAP_BATCH_SIZE_FOR_SYNC

          public static String IDM_TEST_LDAP_BATCH_SIZE_FOR_SYNC

    - #### IDM_TEST_LDAP_USERNAME_LDAP_ATTRIBUTE

          public static String IDM_TEST_LDAP_USERNAME_LDAP_ATTRIBUTE

    - #### IDM_TEST_LDAP_USER_OBJECT_CLASSES

          public static String IDM_TEST_LDAP_USER_OBJECT_CLASSES

    - #### IDM_TEST_LDAP_USER_ACCOUNT_CONTROLS_AFTER_PASSWORD_UPDATE

          public static String IDM_TEST_LDAP_USER_ACCOUNT_CONTROLS_AFTER_PASSWORD_UPDATE

  - ### Constructor Detail

    - #### LDAPEmbeddedServer

          public LDAPEmbeddedServer()

  - ### Method Detail

    - #### loadConnectionProperties

          protected void loadConnectionProperties()

    - #### setup

          public void setup()
                     throws Exception

      Overrides:
        `setup` in class `org.picketbox.test.ldap.AbstractLDAPTest`
      Throws:
        `Exception`

    - #### tearDown

          public void tearDown()
                        throws Exception

      Overrides:
        `tearDown` in class `org.picketbox.test.ldap.AbstractLDAPTest`
      Throws:
        `Exception`

    - #### getLDAPConfig

          public Map<String,String> getLDAPConfig()

    - #### clearSubContexts

          public static void clearSubContexts(DirContext ctx,
                              Name name)
                                       throws NamingException

      Throws:
        `NamingException`

    - #### getConnectionUrl

          public String getConnectionUrl()

    - #### getBaseDn

          public String getBaseDn()

    - #### getUserDnSuffix

          public String getUserDnSuffix()

    - #### getRolesDnSuffix

          public String getRolesDnSuffix()

    - #### getGroupDnSuffix

          public String getGroupDnSuffix()

    - #### getAgentDnSuffix

          public String getAgentDnSuffix()

    - #### isStartEmbeddedLdapLerver

          public boolean isStartEmbeddedLdapLerver()

    - #### getBindDn

          public String getBindDn()

    - #### getBindCredential

          public String getBindCredential()

    - #### getVendor

          public String getVendor()

    - #### isConnectionPooling

          public boolean isConnectionPooling()

    - #### isPagination

          public boolean isPagination()

    - #### getBatchSizeForSync

          public int getBatchSizeForSync()

    - #### getUsernameLDAPAttribute

          public String getUsernameLDAPAttribute()

    - #### getUserObjectClasses

          public String getUserObjectClasses()

    - #### isUserAccountControlsAfterPasswordUpdate

          public boolean isUserAccountControlsAfterPasswordUpdate()

    - #### importLDIF

          public void importLDIF(String fileName)
                          throws Exception

      Overrides:
        `importLDIF` in class `org.picketbox.test.ldap.AbstractLDAPTest`
      Throws:
        `Exception`

    - #### createBaseDN

          protected void createBaseDN()
                               throws Exception

      Overrides:
        `createBaseDN` in class `org.picketbox.test.ldap.AbstractLDAPTest`
      Throws:
        `Exception`

Copyright © 2015. All Rights Reserved.