eu
1 of 8
http://www.mreji.eu/content/openfire-active-directory-ldap-integration
Contents
1. Scenario
2. A brief introduction to LDAP protocol
3. Configure Open Fire
4. Tuning performance
1. Scenario
The scenario goal is to set up OpenFire with LDAP based authentication against Microsoft (MS) Active
Directory (AD).
How it works:
You enter username and password in your jabber client.
Your client sends your credentials to the OpenFire Server.
The OpenFire server tries to connect to the LDAP server with these credentials (make a bind). If connection is
successful the OpenFire server knows, that you are the one who you pretend to be.
The OpenFire server reads user and group information from the AD via LDAP protocol according to some predefined
2/6/2012 8:52 AM
2 of 8
http://www.mreji.eu/content/openfire-active-directory-ldap-integration
Basic assumption:
The easiest way to understand LDAP protocol is to imagine that the file browser on your computer is a LDAP server. You
have a com directory with a subdirectory named company. The company directory in turn contains a subdirectory named
my and so on. Let's assume that you search for all png files. Depending on your search starting point your results will
vary. If you search starts at OUS folder, you probably won't get any results. In terms of LDAP the search starting point is
called base dn and the search criteria is called search filter.
2/6/2012 8:52 AM
3 of 8
http://www.mreji.eu/content/openfire-active-directory-ldap-integration
You can see how people records (DNs) look like in the AD and in an LDAP browser:
3. Configure OpenFire
First open your web browser. In our case OF is installed on dc1.
2/6/2012 8:52 AM
4 of 8
http://www.mreji.eu/content/openfire-active-directory-ldap-integration
2/6/2012 8:52 AM
5 of 8
http://www.mreji.eu/content/openfire-active-directory-ldap-integration
Configure database settings, then enter necessary information. Please note, that you can use a dedicated user
account for OF administrator, no need for AD administrative privileges. Test settings!
2/6/2012 8:52 AM
6 of 8
http://www.mreji.eu/content/openfire-active-directory-ldap-integration
Tweak your user and group filters! You can use this simple filter to extract only users with a valid email address. Of
course you can use any valid field in LDAP schema as a search criteria.
(&(objectClass=organizationalPerson)(mail=*))
You can filter groups by 'group name'. This filter will extract only groups ending with '-fg'.
(&(objectClass=group)(cn=*-fg))
2/6/2012 8:52 AM
7 of 8
http://www.mreji.eu/content/openfire-active-directory-ldap-integration
4 Tuning performance
4.1 Java virtual machine memory settings
In order to achieve best performance you will need to increase default memory used by java VM. In Gentoo linux - go to
/etc/conf.d/openfire
and change -Xmx2048m to the desired value.
/etc/conf.d/openfire
OPENFIRE_HOME=/opt/openfire
OPENFIRE_LIB="${OPENFIRE_HOME}/lib"
OPENFIRE_OPTS="-Xmx2048m -DopenfireHome=${OPENFIRE_HOME} -Dopenfire.lib.dir=${OPENFIRE_LIB}"
OPENFIRE_CLASS="-classpath ${OPENFIRE_LIB}/startup.jar"
OPENFIRE_JAR="-jar ${OPENFIRE_LIB}/startup.jar"
OPENFIRE_ARGS="-server ${OPENFIRE_OPTS} ${OPENFIRE_CLASS} ${OPENFIRE_JAR}"
#JVM used by the openfire server. You can see a list of available vm's in /usr/lib/jvm/
#But remenber that openfire needs a 1.5 jvm
2/6/2012 8:52 AM
8 of 8
http://www.mreji.eu/content/openfire-active-directory-ldap-integration
GENTOO_VM=sun-jdk-1.5
up
2/6/2012 8:52 AM