LibraryLink ToToggle FramesPrintFeedback

JAAS LDAP Authentication Plug-In

The LDAP authentication plug-in enables you to perform authentication by checking the incoming credentials against user data stored in a central X.500 directory server. For systems that already have an X.500 directory server in place, this means that you can rapidly integrate FUSE Message Broker with the existing security database and user accounts can be managed using the X.500 system.

The simplest way to make the login configuration available to JAAS is to add the directory containing the file, login.config, to your CLASSPATH.

Alternatively, you can set the java.security.auth.login.config system property at the command line, setting it to the pathname of the login configuration file (for example, edit the bin/activemq script, adding an option of the form, -Djava.security.auth.login.config=Value to the Java command line). If you are working on the Windows platform, note that the pathname of the login configuration file must use forward slashes, /, in place of backslashes, \.

Example 3.5 shows an example of a login entry for the LDAP authentication plug-in, connecting to a directory repository with the URL, ldap://localhost:10389.


The preceding login entry is configured to search for users under the ou=users,ou=system level in the Directory Information Tree (DIT). For example, an incoming username, jdoe, would match the entry whose DN is uid=jdoe,ou=users,ou=system.

The LDAP login entry supports the following options:

Add user entries under the node specified by the userBase option. When creating a new user entry in the directory, choose an object class that supports the userPassword attribute (for example, the person or inetOrgPerson object classes are typically suitable). After creating the user entry, add the userPassword attribute, to hold the user's password.

If you want to add roles to user entries, you will probably need to customize the directory schema, by adding a suitable attribute type to the user entry's object class. The chosen attribute type must be capable of handling multiple values.

To enable the JAAS LDAP authentication plug-in, add the jaasAuthenticationPlugin element to the list of plug-ins in the broker configuration file, as shown:

<beans>
  <broker ...>
    ...
    <plugins>
      <jaasAuthenticationPlugin configuration="LDAPLogin" />
    </plugins>
    ...
  </broker>
</beans>

The configuration attribute specifies the label of a login entry from the login configuration file (for example, see Example 3.5). In the preceding example, the LDAPLogin login entry is selected.