J2EE Security with EGL LDAP Access

The J2EE security with EGL LDAP access sample contains information about using web container-managed security, as provided by IBM® WebSphere® Application Server, to protect Faces JSP pages from unauthenticated access when the JSF page code generates from an EGL JSF handler.
The time required to run the sample is 15 minutes. Depending on the availability of an LDAP directory server, setup takes less than 1 hour. However, if you are unfamiliar with LDAP or J2EE security, you might need more time.

The sample provides EGL code to access an LDAP-compliant server; you can reuse that code in your web application. This sample reuses logic and data from the "EGL access to LDAP" sample.

This sample uses form-based authentication, as provided by J2EE security, and uses an LDAP-compliant server as the repository. After the user is authenticated, the EGL code reestablishes a connection to the directory server without requiring the user to re-authenticate.

When you run this sample, you request a Faces JSP page that is protected by J2EE security (welcome.jsp). When a login page opens, enter a user ID and password. If you enter a user ID and password pair that is stored in the LDAP-compliant server, you have authenticated, and the JSP page is displayed.

You can display or update the directory-based data that is associated with the user ID. In either case, the EGL code acts as follows:
  1. Connects to the directory server as an administrator
  2. Retrieves the relevant data
  3. Stores the data in a user object (an EGL basic record)
  4. Assigns the user object to the J2EE session
  5. Uses the data to direct processing

The EGL with LDAP-Support project feature adds the LDAPExternalTypes.egl and LDAPLib.egl server-access files to your project. To add LDAP support to a new EGL project whose code is to access an LDAP-compliant server, in the New EGL Project wizard, click Show Advanced Settings. Then click EGL with LDAP Support. To add LDAP support to an existing project, on the Properties page of the project, add the project feature.


Feedback