LdapService

The LdapService allows neutral access to various LDAP systems. In addition to access, it is also possible to install so-called watchers, which are addressed as a kind of trigger when changes in the LDAP system occur and can respond directly to the applications.

Similar to the DatabaseService and other similar services, the LdapService is organised via aliases, each representing access to a particular LDAP system.

XML configuration


Important note: The availability of a service depends on the license purchased and whether the service has been registered in the configuration file ./etc/factory.xml of the Service Factory (changes require server restart!). There you will also find the responsible configuration file for a service, otherwise you can also edit the configuration file of the service directly in the GUI of the service (changes require a service restart!).

Adding an LDAP connection


The following XML fragment adds a new LDAP connection to the LdapService.

<Call name="addSource">
<Arg>demo</Arg>
<Arg>
<New class="com.ebd.hub.services.ldap.LDAPProvider">
<Set name="LDAPFactory">com.sun.jndi.ldap.LdapCtxFactory</Set>
<Set name="LDAPSourceURL">ldap://localhost:389/demo</Set>
<Set name="LDAPAuthentication">simple</Set>
<Set name="LDAPUser">guest</Set>
<Set name="LDAPUserPassword"/>
[possible further settings]
</New>
</Arg>
</Call>


The parameters have the following meaning.


Alias name

The alias that represents the connection, here demo.

LDAPFactory

The factory to use to create the LDAP connection. Usually, the default setting can be used.

LDAPSourceURL

The URL that represents the connection to the LDAP system.These usually start with ldap://. More details can usually be found in the documentation of the LDAP system to be connected. Note: Multiple hosts can be specified separated by spaces.

LDAPAuthentication

The authentication system to use.

LDAPUser

The user name that the service should use to log in to the LDAP system.

LDAPUserPassword

The password that the service should use to log in to the LDAP system.

Adding an LDAP watcher


If you want to add an LDAP watcher to an LDAP connection, you can do this with the following XML fragment, which must be inserted in the wildcard shown above.

<Call name="addWatch">
<Arg>
<New class="com.ebd.hub.services.ldap.LDAPWatch">
<Arg>Person</Arg>
<Arg>System</Arg>
<Arg>ldap</Arg>
</New>
</Arg>
</Call>


The parameters have the following meaning.


Parameter

Description

Person

The ID that is to be checked for changes.

System

The message context to be used when the message is sent in the event of a change.

ldap

The message queue to be used when the message is sent in the event of a change.

Log level dependencies


Changes to the log level of the LogService have no influence on the logging behaviour of the LdapService.

When setting the verbose mode, the sending of a message via the MessageService is reported.