LDAP Security Demo

To use this demo, you must have loaded the ldap entries into the Directory server. You may skip this section if you have loaded the entries.

In order to load the entries, you must have ldap command line utilities installed to load the ldif file. Most Linux and MacOSX installations already have the command line utilities installed, and Windows does not. If you need to install these utilities, you can download the ldap tools from OpenLDAP.

Once you have installed the Ldap command line tools you need to install the LDAP security entries. To do this download the Geronimo geronimo-realm.ldif example LDIF file, and run the following command:

ldapadd -a -D "uid=admin,ou=system" -f geronimo-realm.ldif -h localhost -p 1389 -x -w secret

This will set up the schema entries for this demo.

Testing The LDAP Security

Once the entries have been installed, click on Protect to validate against the LDAP Directory Server. You will be shown a login screen, and use the Username of system and the password of manager. If everything works, you should see "hello world" in your browser.

At this point you have an application that is validating username and passwords against an LDAP Directory Server database based on the security configuration you provided earlier. Now, if you go back here and click on Forbidden you should receive a 403 - Forbidden HTTP error.