Access JasperReports Server using LDAP

We had a few issues getting to the bottom of how to add the LDAP functionality to JasperReports.

So here is how we did it:

Open ‘applicationContext-security.xml‘ which is located in:

This is where it is if you’ve followed our earlier blog post, how to deploy JasperReports Server 4.0 on Glassfish 3.1/3.2.

If you didn’t then it’ll be located within your JasperReports directory somewhere.


To help you find what needs to be changed, download my version of the applicationContext-security.xml file and use some file comparing software to note the changes from the original version.

There are changes on lines:

  • 14: Unremarked the “ldapAuthenticationProvider” line.
  • 78: Enter your LDAP host “ldap://”.
  • 83: Enter username/email address/account name here.
  • 84: Enter the password to the above account on this line.
  • 93: Enter the domain content ‘DC’ structure for your LDAP directory.


Apache Directory Studio will help test the above configuration & help you find your LDAP host, ‘DC’ structure, using its search features.

Once you’ve made the changes to this file, start up Glassfish again and you will be able to login using your corporate account.

*Things to note, if you have a local account in JasperReports with the same name as the account that you’re trying to access from LDAP, access will only be granted using the local password that was set to this account – Not a password coming from your LDAP host.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s