Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun ONE Directory Server Resource Kit 5.2 Tools Reference 

Chapter 34
NameFinder Application

NameFinder is a web-based tool to look up people in an Lightweight Directory Access Protocol (LDAP) database. This chapter provides information on NameFinder. It contains the following sections:


Overview

NameFinder shows all relevant LDAP entries in an LDAP database based on certain search parameters. In order to run the application, you need either Sun™ ONE Web Server 6.0 SP5 or higher or Sun ONE Application Server 7.0 or higher to deploy it. The Java Development Kit (JDK) 1.4.0 or higher must be installed on the server. The WAR file and related files can be found in DSRK_base/NameFinder.


Caution

The Java Development Kit (JDK) 1.4.0 or higher is mandatory. The default JDK for Sun ONE Web Server 6.0 is JDK 1.3.0 and NameFinder will not run on this.



Deploying NameFinder

Before you can deploy a web application manually, you must make sure that the web_server_base/bin/https/httpsadmin/bin directory is in your path and the IWS_SERVER_HOME environment variable is set to your web_server_base directory.

Sun ONE Web Server 6.0 SP5 has a web interface that can be used to easily deploy a web archive (WAR) file. Figure 34-1 is a screen shot of the WAR deployment interface.

Figure 34-1  

Web Server Interface For WAR Deployment

More complete information on how to deploy a WAR file using the interface or via the command line can be found in the documentation for Sun ONE Web Server 6.0.


Configuring NameFinder

After deploying the application, you need to modify the NameFinder.properties file. The NameFinder servlet (as defined in the file itself) retrieves this file automatically for configuration information to display entries from your directory. NameFinder.properties is located in DSRK_base/NameFinder/WEB-INF/classes. The following sections detail the information defined in NameFinder.properties. The information and attribute/value pairs are taken from the sample.properties file also included in DSRK_base/NameFinder/WEB-INF/classes. sample.properties was created for documentation purposes.


Note

Everything in this file is case-sensitive.


Server Configuration Attributes

Information concerning the directory server and directory tree is defined in NameFinder.properties. This includes the base DN, the server domain and the version of LDAP used by the server. The server configurations are:

NameFinder.ldapBase=ou=people,dc=siroe,dc=com

NameFinder.ldapServers=directory.siroe.com

NameFinder.ldapVersion=2

(If no LDAP version is specified, the default is 3.)

NameFinder.servletName=NameFinder

(If no servlet name is specified, the default is NameFinder.)

NameFinder.ldapPort=389

(If no port is specified, the default is 389.)

NameFinder.ldapUser=

NameFinder.ldapPasswd=


Note

Only simple authentication (anonymous or user-based) is supported. If you require SSL authentication, the connection must be provided by the servlet utilities.


LDAP Attribute Configurations

NameFinder can only obtain the LDAP attributes specified in this section of NameFinder.properties. The attribute fields are defined in ascending order. The syntax for the attribute configuration line is:

NameFinder.attr#=arg1|arg2|arg3|arg4|arg5

Where:

Name and Contact Information

NameFinder.attr1=n|n|sn|Name|Lastname

NameFinder.attr2=f|f|givenname||Firstname

NameFinder.attr3=|N|nickname|Nickname

NameFinder.attr4=|1|userdefinedattribute1|Title/Function

NameFinder.attr5=p|p|extensionphone|5digit Phone #|Phone

NameFinder.attr6=P|P|telephonenumber|Phone #

NameFinder.attr7=|A|altcontact|Admin Phone #

NameFinder.attr8=|F|facsimiletelephonenumber|FAX #

NameFinder.attr9=m|e|mail|eMail

NameFinder.attr10=|m|mobile|Mobile

NameFinder.attr11=|a|pager|Pager

NameFinder.attr12=|E|pageremail|SMS/Pager eMail|PagerEmail

NameFinder.attr13=||mailalternateaddress

Location Information

NameFinder.attr14=C|C|countrycode|Countrycode

NameFinder.attr15=l|l|globallocation|Building Code|LOC

NameFinder.attr16=|||Flexible Office|

NameFinder.attr17=g|g|l|Ext.Location

NameFinder.attr18=|M|extendedaddress|Mailstop

NameFinder.attr19=|r|roomnumber|Room #

Calendar Information

NameFinder.attr20=|c|calendar|Calendar

NameFinder.attr21=|Z|preferredtimezone|Local Time|Timezone

Miscellaneous Information

NameFinder.attr22=|h|labeleduri|Homepage

NameFinder.attr23=s|s|employeenumber|SunID

NameFinder.attr24=D|D|departmentnumber|Department #|CC

NameFinder.attr25=|||Direct Reports

NameFinder.attr26=r|R|reportsto|Reports to

NameFinder.attr27=|2|userdefinedattribute2|Personal Field2

NameFinder.attr28=u|u|uid|Loginname

NameFinder.attr29=||mailhost|Mailserver

NameFinder.attr30=||host|Hostname

NameFinder.attr31=||employeetype

NameFinder.attr32=||photourl

Predefined Attribute Fields

Predefined fields contain LDAP attributes as values. For example, if lastNameField, firstNameField and/or emailField are specified, NameFinder automatically searches on the attributes defined in these fields. It will search up to six levels to find an entry. Following is a list of the predefined fields.

Code Example 34-1 is the NameFinder.properties file.

Code Example 34-1  NameFinder.properties File 

NameFinder.ldapBase=ou=people,dc=siroe,dc=com

NameFinder.ldapServers=directory.siroe.com

NameFinder.ldapVersion=2

NameFinder.servletName=NameFinder

#NameFinder.ldapPort=389

#NameFinder.ldapUser=

#NameFinder.ldapPasswd=

#

#Name and contact information

#

NameFinder.attr1=n|n|sn|Name|Lastname

NameFinder.attr2=f|f|givenname||Firstname

NameFinder.attr3=|N|nickname|Nickname

NameFinder.attr4=|t|userdefinedattribute1|Title/Function

NameFinder.attr5=p|p|extensionphone|5digit Phone #|Phone

NameFinder.attr6=P|P|telephonenumber|Phone #

NameFinder.attr7=|A|altcontact|Admin Phone #

NameFinder.attr8=|F|facsimiletelephonenumber|FAX #

NameFinder.attr9=m|e|mail|eMail

NameFinder.attr10=|m|mobile|Mobile

NameFinder.attr11=|a|pager|Pager

NameFinder.attr12=|E|pageremail|SMS/Pager eMail|PagerEmail

#

#Location information

#

NameFinder.attr13=C|C|countrycode|Countrycode

NameFinder.attr14=l|l|globallocation|Building Code|LOC

NameFinder.attr15=|||Flexible Office|

NameFinder.attr16=g|g|l|Ext.Location

NameFinder.attr17=|M|extendedaddress|Mailstop

NameFinder.attr18=|r|roomnumber|Room #

#

#Calendar information

#

NameFinder.attr19=|c|calendar|Calendar

NameFinder.attr20=|Z|preferredtimezone|Local Time|Timezone

#

#Misc. information

#

NameFinder.attr21=|h|labeleduri|Homepage

NameFinder.attr22=s|s|employeenumber|SunID

NameFinder.attr23=D|D|departmentnumber|Department #|CC

NameFinder.attr24=||dummyfield1|Direct Reports

NameFinder.attr25=r|R|reportsto|Reports to

NameFinder.attr26=||userdefinedattribute2|Personal Field2

NameFinder.attr27=u|u|uid|Loginname

NameFinder.attr28=||mailhost|Mailserver

NameFinder.attr29=||host|Hostname

NameFinder.attr30=||employeetype

NameFinder.attr31=||photourl|Photo

#

NameFinder.tableFields=sn|givenname|mail|employeenumber|extensionphone|glob allocation|departmentnumber

NameFinder.phoneFields=extensionphone|telephonenumber|mobile

NameFinder.reportsTableFields=sn|givenname|extensionphone|mail|globallocati on

NameFinder.teamTableFields=sn|telephonenumber|mail|calendar|labeleduri|mobi le|pageremail

NameFinder.lastNameField=sn

NameFinder.firstNameField=givenname

NameFinder.nickNameField=nickname

NameFinder.emailField=mail

NameFinder.uidField=uid

NameFinder.photoUrlField=photourl

NameFinder.locationField=globallocation

NameFinder.calendarServerField=calendar

NameFinder.calidField=uid

NameFinder.timeZoneField=preferredtimezone

NameFinder.uniqueIdField=employeenumber

NameFinder.phoneField=extensionphone

NameFinder.mobilePhoneField=mobile

NameFinder.managerField=reportsto

#managerSearchField needs to be set if your do not search with the uniqueIdField in the managerField

NameFinder.managerSearchField=employeenumber

#NameFinder.extraSearch=(|(cn=@*)(description=*@*)(globallocation=*@*)(stre etaddress1=*@*)(streetaddress2=*@*)(city=*@*)(c=*@*))

#

#NameFinder.emptyEntry=<img align="TOP" src="/nf/empty.gif">

#NameFinder.scanEntry=<img align="TOP" src="/nf/scan.gif">

#NameFinder.lastEntry=<img align="TOP" src="/nf/lastEntry.gif">

#NameFinder.entry=<img align="TOP" src="/nf/entry.gif">

#


Search Parameters

Table 34-1 is a listing of available search parameters based on NameFinder.properties. The parameters refer to the defined options as detailed in LDAP Attribute Configurations. Wildcards (*) are allowed in the search field.

Table 34-1  Search Parameters

Parameter

Example

firstname lastname

John Smith

lastname firstname

m* da silva

firstname lastname

de* be*

lastname

-n Smith

lastname

-n m*ller

firstname or lastname

m*cdonald

firstname or lastname

*ben

firstname

-f hugo

firstname lastname

d* sch*

SunID

12345

firstname.lastname

d*.sch*

-p phone

-p x62155*

-u loginname

-u scott

-l locationcode

-l muc07

URL

http://namefinder/nf/nfJon.txt



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.