This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

LDAP for JSPWiki 2.2#

This module provides a simple LDAP based authenticator. Following properties are required:

  • jspwiki.authenticator - name of our class: LDAPAuthenticator
  • jspwiki.ldapAuthenticator.serverurl - URL of the server used for authentication (ex: ldap://myserver/)
  • jspwiki.ldapAuthenticator.binddn - DN of an existing user used when searching entries (ex: cn=myuser,dc=in,dc=mydomain)
  • jspwiki.ldapAuthenticator.binddn-password - Password for the previous DN (ex: mypassword)
  • jspwiki.ldapAuthenticator.accountattribute - attribute to search for (ex, for a Windows Directory: sAMAccountName)
  • jspwiki.ldapAuthenticator.searchbase - The DN of the branch of the directory where all searches should start from. (ex: dc=mydomain)

Please note that this code as only been lightly tested against a Windows 2000 Active Directory LDAP server with version 2.1.103 of JSPWiki.

-- Sebastien Tanguy

Parameters which must be set in

  • jspwiki.authorizer = PageAuthorizer
  • jspwiki.policy.strictLogins = true
  • jspwiki.auth.useOldAuth = true

There is working class with some changes which works fine with OpenLDAP server.

-- Raimondas Berniunas

LDAP for JSPWiki 2.4#

For JSPWiki 2.4.x, there is a UserDatabase-based LDAP implementation available at .

--Kiesel, 26-July-2006


This LDAPAuthenticator class will not work for newer versions of JSPWiki as there is no interface called WikiAuthenticator.

Is there LDAPAuthenticator available for newer versions.

Thanking You Kiran Thakkar

--Kiran Thakkar, 16-Mar-2006

I'm planning to release ASAP a new class which will work with the newest version of JspWiki. -- Raimondas Berniunas

--Raimis, 13-Apr-2006

Hi Raimis --

There are two ways you could do this with the 2.3.x version of JSPWiki:

  • Create a JAAS LoginModule that interfaces with LDAP. Then, you'd add the login module to the JAAS configuration file jspwiki.jaas that tells JSPWiki which login modules to invoke. You'd add it to this block:
JSPWiki-custom {
  com.raimis.LDAPLoginModule    SUFFICIENT;
  com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule    SUFFICIENT;
  • Implement UserDatabase so that it calls LDAP for authentication, and can store and retrieve user attributes. In this case, you'd need users to modify the jspwiki.userdatabase property in

Either method would work, but if using LDAP as a repository for user information is what you want, a custom UserDatabase implementation is the way to go... and if that's something you choose to do, I'd be very interested in adding it to the core JSPWiki build.

PS. There is a third alternative that I didn't mention -- if you use your servlet container's authentication system, then you clearly have the ability to use whatever the container provides. Most containers provide a sample LDAP authentication option. But I assumed you wanted something that was less container-dependent, and usable with any JSPWiki implementation.

--AndrewJaquith, 15-Apr-2006

Hi Andrew

Can you please elaborate on first option. I mean if i write LDAPAuthentication code in LoginModule then what will take place of UserDatabase. And UserDatabase is used at so many places specially to check ACLs.

If i can have some more idea on first option then i don't mind writing it so that we can use it.

--Kiran Thakkar, 17-May-2006

Just to be up to date: Which is the latest JSPWiki version running with LDAP Athentification? We are still using JSPWiki 2.2.33 which supports LDAP - but we would like to update to a newer JSPWiki, if LDAP is supported. Which version do you recommend? We only need authentification, no groups and no roles. Thanks, --els 26.6.06 Tagged with AnswerMe. 28-June-2006

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
java 6.3 kB 4 26-Apr-2007 15:25
openldap 6.3 kB 1 14-Nov-2005 22:07
« This particular version was published on 28-Jul-2006 16:53 by Wolfgang Mansk.