Sun Java System Directory Server Enterprise Edition 6.3 Developer's Guide

Appendix A NameFinder Application

This chapter describes how to deploy and configure NameFinder.

NameFinder is a web application that offers users a convenient, browser-based interface. The application allows users to look up contact and organizational information in a Lightweight Directory Access Protocol (LDAP) directory.

This chapter covers the following topics:

Prerequisite Software

The NameFinder application depends on the following prerequisite software items:

Subsequent versions of the prerequisite software can be used as well. You must install and configure prerequisite software before deploying the NameFinder application. Refer to the Sun Java Enterprise System 5 Installation Guide for UNIX or a more recent edition for instructions on installing the prerequisite software.

Deploying NameFinder

You can deploy the NameFinder application on Application Server or on Web Server.

ProcedureTo Deploy on Application Server

Before You Begin

Before deploying the NameFinder application, make sure you have installed and configured the software listed in Prerequisite Software.

  1. Log in to the Application Server browser-based administration interface.

    For example, if you configured the Application Server administration interface to use the default port, go to http://hostname:4848/.

  2. Select a server instance on which to deploy the NameFinder application.

    For example, if you configured Application Server to use the default settings, select server1.

  3. Upload nfDSRK.war as a web application, accepting the default settings.

    You can find the nfDSRK.war web application archive in the class directory where you installed Directory Server Resource Kit, install-path/dsrk6/class/nfDSRK.war.

  4. Apply changes to the server instance.

  5. View the NameFinder application for the first time.

    For example, if you configured Application Server to use the default settings, go to http://hostname:81/nfDSRK/.

    You can now proceed to Configuring NameFinder to Access Your Directory.

ProcedureTo Deploy on Web Server

Before You Begin

Before deploying the NameFinder application, make sure you have installed and configured the software listed in Prerequisite Software.

  1. Log in to the Web Server browser-based administration interface.

    For example, if you configured the Web Server administration interface to use the default port, go to http://hostname:8888/.

  2. Click Manage next to the Web Server Hostname drop-down menu.

  3. Select the Virtual Server Class tab, and then click Manage next to the Virtual Server Class drop-down menu.

  4. Click Manage next to the Virtual Server drop-down menu.

    This page is where you manage the server instance on which to deploy the NameFinder application.

  5. Select the Web Application tab, and then complete the web form for application deployment.

    You can find the nfDSRK.war web application archive in the class directory where you installed the Directory Server Resource Kit, install-path/dsrk6/class/nfDSRK.war.

    Notice when completing the web form that the installation directory is install-path/dsrk6/class/.

    Furthermore, you can change the name of the application URI. The default is /nfDSRK. Another possible application URI is /NameFinder.

  6. Apply the changes.

  7. Return to the Server Manager page to turn the server off, and then turn the server on again.

  8. View the NameFinder application for the first time.

    For example, if you configured Web Server to use the default settings and entered /nfDSRK as the application URI, go to http://hostname/nfDSRK/.

    You can now proceed to Configuring NameFinder to Access Your Directory.

Configuring NameFinder to Access Your Directory

You can configure NameFinder to access your directory on Application Server or on Web Server.

ProcedureTo Configure Access When Using Application Server

After deploying the NameFinder application, Application Server creates a WEB-INF/ container directory that holds NameFinder files. The location of this directory depends on where you installed the Application Server instance.

You must specify in the WEB-INF/classes/NameFinder.properties file how to access the directory that holds the data to retrieve.

  1. If necessary, determine the path where you deployed the NameFinder application with the Application Server browser-based interface.

    The WEB-INF/classes/NameFinder.properties file is located in that directory.

  2. Become a user, such as superuser, with access to edit the file.

  3. Adjust properties in the WEB-INF/classes/NameFinder.properties file to allow the application to access the directory, and then save your changes.

    The NameFinder.properties file is a Java properties file. Everything in the file is case sensitive. Adjust at least the following lines:

    NameFinder.ldapBase=baseDN
    NameFinder.ldapServers=serverList
    NameFinder.ldapVersion=3
    NameFinder.ldapPort=ldapPort
    NameFinder.ldapUser=bindDN
    NameFinder.ldapPasswd=bindPassword
    
    • baseDN is the base DN for people's entries in your organization, such as ou=people,dc=example,dc=com.

    • serverList is a | separated list of directory servers, such as directory|backup-directory|ext-directory.example.com.

    • ldapPort is the port number on which the servers listen for LDAP requests, by default 389.

    • bindDN is the DN used to authenticate.

      Do not enclose the bind DN in quotes.

    • bindPassword is the password used to authenticate.

    For hints regarding what you can adjust, read the comments in the WEB-INF/classes/sample.properties file.

  4. In the Application Server browser-based interface, apply changes on the server instance by pressing the Apply Changes button.

    After applying changes, you can begin using the NameFinder application to look up contact and organizational information.

  5. Verify that the NameFinder application works by searching for a known user, such as yourself, using the browser-based interface.

    After you are satisfied that the NameFinder application works, you can choose to customize the application for your organization.

ProcedureTo Configure Access When Using Web Server

After deploying the NameFinder application, Web Server creates a WEB-INF/ container directory that holds NameFinder files. The location of this directory depends on where you installed the Web Server instance.

You must specify in the WEB-INF/classes/NameFinder.properties file how to access the directory that holds the data to retrieve.

  1. If necessary, determine the path where you deployed the NameFinder application with the Web Server browser-based interface.

    The WEB-INF/classes/NameFinder.properties file is located in that directory.

  2. Become a user, such as superuser, with access to edit the file.

  3. Adjust properties in the WEB-INF/classes/NameFinder.properties file to allow the application to access the directory, and then save your changes.

    The NameFinder.properties file is a Java properties file. Everything in the file is case sensitive. Adjust at least the following lines:

    NameFinder.ldapBase=baseDN
    NameFinder.ldapServers=serverList
    NameFinder.ldapVersion=3
    NameFinder.ldapPort=ldapPort
    NameFinder.ldapUser=bindDN
    NameFinder.ldapPasswd=bindPassword
    
    • baseDN is the base DN for people's entries in your organization, such as ou=people,dc=example,dc=com.

    • serverList is a | separated list of directory servers, such as directory|backup-directory|ext-directory.example.com.

    • ldapPort is the port number on which the servers listen for LDAP requests, by default 389.

    • bindDN is the DN used to authenticate.

      Do not enclose the bind DN in quotes.

    • bindPassword is the password used to authenticate.

    For hints regarding what you can adjust, read the comments in the WEB-INF/classes/sample.properties file.

    You must restart Web Server for the changes to take effect.

  4. Return to the Server Manager page in the Web Server browser-based interface to turn the server off, then on again.

    At this point, you can begin using the NameFinder application to look up contact and organizational information.

  5. Verify that the NameFinder application works by searching for a known user, such as yourself, using the browser-based interface.

    After you are satisfied that the NameFinder application works, you can choose to customize the application for your organization.

Customizing NameFinder

This section covers what you can customize in the NameFinder web application, using only the Java properties files provided. Detailed explanations of individual properties can be found in the WEB-INF/classes/sample.properties file in the directory where you deployed the application.


Note –

NameFinder was designed as a Sun internal web application. The default configuration therefore relies on Sun's LDAP schema and directory information tree (DIT). The schema and DIT probably differ from the schema and DIT in use at your organization.


In addition to customizations within the application, you can also customize searches by using options in the search field. Furthermore, you can customize what attributes to display within the browser-based interface. Refer to the NameFinder online help for details.

Connection Properties

As described in Configuring NameFinder to Access Your Directory, you customize the WEB-INF/classes/NameFinder.properties file to allow the application to access your directory.

By convention, connection parameters are included in the first few lines of the Java properties file. You can configure to which host-port combination NameFinder connects. You can also configure whether to use LDAP v2 or v3, and whether to bind as a particular user.

NameFinder connection properties only allow you to configure simple authentication connections to the directory, however. You cannot use connection properties to configure NameFinder to connect using SSL or a SASL mechanism.

Search Attribute Properties

NameFinder lets you configure attributes that define search options, attributes to search, and labels for the values returned. The Java properties definitions for such attributes take the following form:

NameFinder.attr#=optChar|colChar|attr|label|colLabel
#

A decimal number

Do not leave any numbers in the sequence that remain commented out. NameFinder depends on having the numbers in ascending order without gaps.

optChar

An option character for use in searches

For example, P is by default the phone number option. Thus, search for the entry with phone number 1 234 567 8910 by typing -P "1 234 567 8910" in the NameFinder search field.

Do not use F as an option character. This character is reserved to allow you to enter LDAP search filters, such as -F "(telephoneNumber=1 234 567 8910)", directly.

This parameter is called arg1 in WEB-INF/classes/sample.properties.

colChar

A character for use in defining table columns as a parameter to NameFinder

For example, you can use the default configuration. You use the default by passing fields=nfeP as one of the options in the URL to NameFinder for a search that returns multiple entries. NameFinder displays results in a four-column table that has column labels Lastname, Firstname, eMail, and Phone #.

This argument is called arg2 in WEB-INF/classes/sample.properties.

attr

The LDAP attribute to search when using optChar

This argument is called arg3 in WEB-INF/classes/sample.properties.

label

The label to display for the corresponding attr value when showing results for a single LDAP entry

This argument is called arg4 in WEB-INF/classes/sample.properties.

colLabel

The column label to display in the table header for the corresponding attr value when showing results for multiple LDAP entries

This argument is called arg5 in WEB-INF/classes/sample.properties.

You can leave variables blank in search attribute properties definitions.

Other Properties

In addition to connection and search attribute properties, NameFinder allows you to define several other properties in the WEB-INF/classes/NameFinder.properties file. These other properties govern the following:

Refer to WEB-INF/classes/sample.properties for details.