Netscape DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION Manual

Hide thumbs Also See for NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION:
Table of Contents

Advertisement

Gateway Customization Guide
Netscape Directory Server
Version 6.2
December 2003

Advertisement

Table of Contents
loading

Summary of Contents for Netscape NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION

  • Page 1 Gateway Customization Guide Netscape Directory Server Version 6.2 December 2003...
  • Page 2 Netscape Communications Corporation ("Netscape") and its licensors retain all ownership rights to the software programs offered by Netscape (referred to herein as "Software") and related documentation. Use of the Software and related documentation is governed by the license agreement for the Software and applicable copyright law.
  • Page 3: Table Of Contents

    Contents Preface ............... 11 Prerequisite Reading .
  • Page 4 Securing Gateway Configuration and Settings ......... . . 25 Protecting Bind DN and Password .
  • Page 5 template ............... . . 46 location .
  • Page 6 Chapter 6 Customizing Graphics and Color ........71 Appearance of Gateway Forms .
  • Page 7 Format ................85 Example .
  • Page 8 Context-Related Directives ............. . 95 GCONTEXT .
  • Page 9 DS_CONFIRM_NEWPASSWORD ........... . 104 Arguments .
  • Page 10 Arguments ..............109 Example .
  • Page 11: Preface

    Preface The descriptions, instructions, and examples in this guide can be used to create and modify a gateway instance to suit the needs of users in your organization. The Preface contains the following sections: • Prerequisite Reading (page 11) • Conventions Used in This Book (page 12) •...
  • Page 12: Conventions Used In This Book

    Conventions Used in This Book Conventions Used in This Book This section explains the conventions used in this book. —This typeface is used for any text that appears on the computer Monospaced font screen or text that you should type. It is also used for filenames, functions, and examples.
  • Page 13: Related Information

    Related Information Related Information The document set for Directory Server also contains the following guides: • Netscape Directory Server Installation Guide. Contains procedures for installing your Directory Server as well as procedures for migrating your Directory Server. • Netscape Directory Server Administrator’s Guide. Contains procedures for the day-to-day maintenance of your directory service.
  • Page 14 Related Information Netscape Directory Server Gateway Customization Guide • December 2003...
  • Page 15: Chapter 1 Introduction

    Chapter 1 Introduction This chapter describes the gateway functionality of Netscape Directory Server (Directory Server). The chapter contains the following sections: • What is a Gateway? (page 15) • Directory Express and Default Gateway (page 17) • Support for Multiple Gateway Instances (page 19) •...
  • Page 16: Gateways Installed With Directory Server

    What is a Gateway? • A configuration directory for directory search, directory authentication, language files, and gateway scripts. Gateways Installed with Directory Server Two gateway instances are installed during Directory Server installation: the default gateway and Directory Express. Both gateways are configured to use the suffix set when the Directory Server was configured, and non-SSL (Secure Socket Layer) communications.
  • Page 17: Http Server Requirements For Gateways

    Directory Express and Default Gateway During Directory Server installation, Directory Express is configured to use as its HTTP server the Netscape Administration Server installed with the directory. Following Directory Server installation, Directory Express can be accessed from http://adminHost:adminPort/ or directly using this URL: http://adminHost:adminPort/clients/dsgw/bin/lang?context=pb HTTP Server Requirements for Gateways A gateway instance requires an HTTP server that can communicate with Directory...
  • Page 18 Directory Express and Default Gateway Figure 1-1 Directory Express: Search Result Figure 1-2 Directory Express: Extended Search Results Netscape Directory Server Gateway Customization Guide • December 2003...
  • Page 19: Default Gateway (Dsgw.conf)

    Support for Multiple Gateway Instances Default Gateway (dsgw.conf) In addition to the standard search form, the default gateway provides an advanced search form, a Directory Server authentication form, and a form for adding and modifying entries. Figure 1-3 Default Gateway Support for Multiple Gateway Instances Directory Server supports multiple gateway instances—that is, many gateways can access directory data from the same HTTP server without conflict.
  • Page 20: Specifying Gateway Configuration To Gateway Cgis

    Support for Multiple Gateway Instances Specifying Gateway Configuration to Gateway CGIs Information about which file to use is communicated in the .conf QUERY STRING using a , and through a hidden variable on a POST GET Operations (GCONTEXT) In a operation, gateway CGIs get the gateway context from the QUERY STRING in the URL.
  • Page 21: Urls For Gateway Access

    Anonymous and Non-Anonymous Searching For more information about content-related directives, see “Context-Related Directives” on page 95. URLs for Gateway Access The URL customers use to access a 6.2 gateway differs from the URL customers use to access a 4.x gateway. To get to a 6.2 gateway, users enter the following URL: http://adminHost:adminPort/clients/dsgw/bin/lang?context=<context>...
  • Page 22: Compatibility With Previous Releases Of Gateway

    Compatibility with Previous Releases of Gateway NOTE contains highly sensitive information. Do not store binddnfile under or in any directory serverRoot/clients/dsgw binddnfile that is served up over HTTP (for instance, is a /bin/slapd/server good place to store the binddnfile Compatibility with Previous Releases of Gateway Release 6.2 of the gateway is compatible with the 4.x release of the gateway.
  • Page 23: Chapter 2 Setting Up The Gateway

    Chapter 2 Setting Up the Gateway This chapter describes the planning decisions and tasks required to install and initially configure a gateway for access by end users. The chapter contains the following sections: • Gateway Installation Planning (page 23) • HTTP Server Configuration (page 27) •...
  • Page 24: Gateway Release 6.2

    Gateway Installation Planning Gateway Release 6.2 Two gateway instances are installed during Directory Server 6.2 installation: Netscape Directory Express (Directory Express) and the default gateway. The configuration files ( ) for the two instances are stored in the pb.conf dsgw.conf directory.
  • Page 25: Gateway Cloning

    Gateway Installation Planning Gateway Cloning Unique gateway instances may have unique HTML directories (for example, ) and template directories (for example, ..clients/dsgw/mythml ). However, gateways may also be cloned to use ..clients/dsgw/myconfig identical HTML and template directories while pointing to different Directory Servers or different suffixes on a Directory Server.
  • Page 26: Http Server Recommendations For Directory Server Gateway

    Gateway Installation Planning Changes made to the Directory Server configuration ( ) by the Netscape dse.ldif Console are posted to and the relevant gateway files are updated. updatedsgw These files will be updated only when the host and port for the gateway match the host and port of the Directory Server.
  • Page 27: Running The Gateway In High-Usage Networks

    HTTP Server Configuration Running the Gateway in High-Usage Networks Network administrators expecting high gateway usage may wish to move the gateway to a high-performance HTTP server that is dedicated to running the gateway. NOTE If you do decide to migrate the gateway’s configuration files to a high-performance HTTP server, we recommend you use Netscape Enterprise Server.
  • Page 28: Configuring The Gateway For Web Servers

    HTTP Server Configuration When the Directory Server’s suffix changes, it is necessary to run the script manually to propagate the change to all gateway instances. updatedsgw NOTE When the root suffix, directory manager, or port change, the gateway settings in must be updated to reflect the dsgw.conf changes (if they haven’t been updated by Netscape Console).
  • Page 29 HTTP Server Configuration Add an additional CGI directory. Adding an additional CGI directory is necessary to make the gateway’s CGI programs available. For additional information, see http://enterprise.netscape.com/docs/enterprise/611/admin/esprgrm .htm#21309 From the Class Manager for the Netscape Enterprise Server: Select Programs > CGI Directory. In the URL Prefix field, enter the URL prefix to use: /clients/dsgw/bin In the CGI Directory field, enter this (replace...
  • Page 30: Creating A New Gateway Instance

    Creating a New Gateway Instance Select System Settings > View Server Settings and note the value set for the User field. If this value is set to , check to make sure that the server is not nobody running as a named user. For example, on Solaris grep for the HTTP process: ps -ef | grep http The process listed identifies the name under which the HTTP process is...
  • Page 31: Gateway Cloning

    Gateway .conf File Configuration To support non-anonymous searching (one individual user DN and password per directory instance) using the new gateway, set the parameter binddnfile to point to the location of the file containing the bind DN and example.conf bind password that will be used to access information in the user directory. contains sensitive information;...
  • Page 32: Changing The Default Port Setting

    Gateway .conf File Configuration • Setting Up a Directory Manager for the Gateway • Setting up the Suffix for Adding Entries • Setting Up SSL Support • Setting vCard Properties Changing the Default Port Setting The LDAP port is set during Directory Server installation. This value can be changed in the parameter.
  • Page 33: Configuring The Directory Manager Dn

    Gateway .conf File Configuration Configuring the Directory Manager DN Use this procedure to configure the gateway Directory Manager to reference the correct DN: Create an entry for the gateway Directory Manager, making sure to set a password for the entry. Set the permissions for the Directory Manager so that it has read and write authority for the entries it will manage.
  • Page 34: Setting Up The Suffix For Adding Entries

    Gateway .conf File Configuration Figure 2-1 Authenticating as Directory Manager Setting up the Suffix for Adding Entries parameter is defined in , and identifies the location-suffix dsgw.conf suffix under which the gateway creates new entries in the directory. The parameter can point to any suffix in a directory. location-suffix Setting the parameter is described in “include”...
  • Page 35: Configuring The Gateway To Use Ssl

    Configuring Gateway Clients Enabling SSL communications on the Directory Server is described in the Netscape Directory Server Administrator’s Guide. Information about managing key and certificate databases is provided in Managing Servers with Netscape Console. Configuring the Gateway to Use SSL parameter specifies the location of the certificate database.
  • Page 36: Language Support For Http Clients

    Configuring Gateway Clients Language Support for HTTP Clients When a user accesses information in the directory from an HTTP client—through the gateway or another HTTP-based LDAP interface—the client provides the Directory Server with information indicating the optimal character set and collation order to use in transmitting information to the browser.
  • Page 37: Customizing Communicator's Ldap Settings

    Configuring Gateway Clients Go to Edit > Preferences > Navigator > Languages/Content and configure the list of languages so that the best description of the user’s language is first, followed by other acceptable languages. For example, a speaker of British English who also reads Spanish might list English/United Kingdom [en-GB] first, followed by English [en] and then Spanish [es].
  • Page 38 Configuring Gateway Clients Netscape Directory Server Gateway Customization Guide • December 2003...
  • Page 39: Chapter 3 File Controlling Gateway Functionality

    Chapter 3 File Controlling Gateway Functionality This chapter provides examples of customized gateways. The chapter contains the following sections: • Files Controlling Gateway Functionality (page 39) • Gateway .conf Files (page 41) • Gateway Search Configuration Files (page 41) • Object Class Templates (page 42) •...
  • Page 40 Files Controlling Gateway Functionality • Change the appearance of gateway forms • Update the gateway with changes to Directory Server configuration Files that control gateway functionality are described in Table 3-1. Table 3-1 Gateway File Types and Locations Files Function Location Gateway .conf Define basic...
  • Page 41: Gateway .Conf Files

    Gateway .conf Files Gateway .conf Files A gateway’s configuration file ( file) describes an instance of the gateway. .conf The file controls the host, port, root suffix, and Directory Manager to use when communicating with the Directory Server. The file also controls: •...
  • Page 42: Object Class Templates

    Object Class Templates • dsgwfilter.conf This file specifies the search filters used to search for a particular object class. The gateway uses this file when performing a standard search operation. files are discussed in Chapter dsgwsearchprefs.conf dsgwfilter.conf 5, “Search Attributes, Filters, and Results.” Object Class Templates The gateway contains a template file for each object class defined in the gateway.
  • Page 43: Gateway Script Files

    Gateway Script Files Gateway Script Files Script files are used to dynamically generate HTML forms for the user, based on information supplied by the user and information retrieved from the Directory Server. Script files contain directives the gateway uses to construct the HTML for a page.
  • Page 44: Banner Files

    Banner Files Table 3-4 Default Search Result Templates (Continued) Search Result Template Related Object Class Auth (internal) list-Auth.html Domain listDomaincomponent.html Groups list-Groups.html NT-Groups list-NT-Groups.html NT-People list-NT-People.html Org-Units list-Org-Units.html Organization list-Organizations.html People list-People.html Chapter 5, “Search Attributes, Filters, and Results” describes how search result templates can be edited to modify the display of search results.
  • Page 45: Chapter 4 Editing Entry Types

    Chapter 4 Editing Entry Types This chapter describes how entry type formats—defined by object classes and their attributes—can be controlled by editing parameters in the file. The dsgw.conf chapter contains the following sections: • Entry Types (Object Classes) (page 45) •...
  • Page 46: Template

    Entry Types (Object Classes) Parameters in the file are described in Appendix A, “Parameters dsgw.conf Defined in the .conf File.” template parameter is used to map the gateway’s HTML templates for entry template types to the Directory Server’s LDAP object classes. location parameter is used to define points in the directory tree where new location...
  • Page 47: Considerations For Adding New Entry Types

    Mapping Locations and Entry Types Considerations for Adding New Entry Types Before adding support for a new entry type (object class), decide: • Where will the new entry be created? If a parameter is not set up to point to the location where the new location entry type will be created, add a new parameter to the...
  • Page 48: Setting Up Organizational Units

    Mapping Locations and Entry Types location country "United States" "c=US#" location "This Organization" "" location groups "Organizational Groups" "ou=Groups" location acct "Accounting" "ou=Accounting" location "Human Resources" "ou=Human Resources" location "Payroll" "ou=Payroll" location "Product Development" "ou=Product Development" location test "Product Testing" "ou=Product Testing"...
  • Page 49: Uid-Based Dn

    Object Class Attributes in Template Files UID-Based DN When a person or NT person entry is added to the directory, the gateway prompts for a unique DN. The unique DN is typically the user ID of a person in the organization.
  • Page 50: Default Gateway Object Classes

    Object Class Attributes in Template Files Default Gateway Object Classes The default gateway supports the object classes listed in Table 4-1. Table 4-1 Default Object Classes Default Gateway Object Class Related Template File domain component display-dc.html groupOfNames display-group.html groupOfUniqueNames display-groupun.html ntGroup display-ntgroup.html organization...
  • Page 51: Adding Attributes To Object Classes

    Object Class Attributes in Template Files Adding Attributes to Object Classes Adding an attribute to an object class requires adding an additional row to the HTML table in the template file where the object class is defined. The syntax in the following example defines an attribute for the Initials object class:...
  • Page 52: Extending Object Classes

    Object Class Attributes in Template Files Insert a null pair to replace the deleted attribute (boldfaced below). <TR> <TD VALIGN=”TOP” NOWRAP>Pager:</TD> <TD VALIGN=”TOP” NOWRAP><B> <!-- DS ATTRIBUTE “attr=pager” “syntax=tel” “cols=>16” --> </B></TD> <TD>&nbsp;</TD> <TD>&nbsp;</TD> </TR> When deleting a single attribute-value pair from a row, replace the NOTE two deleted cells with two cells containing the non-breaking space character.
  • Page 53 Object Class Attributes in Template Files Edit the third line in the template file to indicate the name of the new directory entry type. Change: <!-- inet. organizational person directory entry --> <!-- example person directory entry --> Edit the directive to include the new object class.
  • Page 54: Creating A New Parent Object Class

    Object Class Attributes in Template Files Define a parameter in for the object class template dsgw.conf examplePerson template exampleperson person inetorgperson exampleperson This will instruct the gateway to display the entry type exampleperson according to the template defined for the object class examplePerson display-exampleperson.html...
  • Page 55: Chapter 5 Search Attributes, Filters, And Results

    Chapter 5 Search Attributes, Filters, and Results This chapter describes the files that control how the gateway searches for objects and describes how to add search support for a new object. The chapter contains the following sections: • Search Configuration Files (page 55) •...
  • Page 56: Dsgwfilter.conf

    Changing Search Scope • The search filter to append to the search string (corresponding to the search filter entry defined in dsgwfilter.conf • The label of the search attribute as it is displayed in the Find drop-down list on the Search form •...
  • Page 57: Modifying Search Attributes For Advanced Searches

    Modifying Search Attributes for Advanced Searches Table 5-1 Valid Search Scopes Search Scope Tells the Gateway to... Search the Directory Server for the entry specified in the base baseurl parameter but do not search in children of the entry. Do not search in the entry specified in the baseurl parameter, onelevel but search in the most immediate children of the entry.
  • Page 58 Modifying Search Attributes for Advanced Searches Figure 5-1 Advanced Search Form: Search Results The figures that follow show the matching patterns that can be selected in the Advanced Search form. Figure 5-2 shows the entry type pop-up menu on the Advanced Search form. Netscape Directory Server Gateway Customization Guide •...
  • Page 59 Modifying Search Attributes for Advanced Searches Figure 5-2 Advanced Search Form: Entry Type Figure 5-3 shows the attribute pop-up menu on the Advanced Search form. Figure 5-3 Advanced Search Form: Attribute Figure 5-4 shows the matching filter pop-up menu on the Advanced Search form. Chapter 5 Search Attributes, Filters, and Results...
  • Page 60: Specifying Search Attributes For Person

    Modifying Search Attributes for Advanced Searches Figure 5-4 Advanced Search Form: Matching Filter Specifying Search Attributes for Person syntax in the following example specifies that the dsgwsearchprefs.conf , and attributes will be used in a search for telephoneNumber mail title person entries: People ““...
  • Page 61: Directory Express Search Support For User Id

    Modifying Search Attributes for Advanced Searches The third column contains a string of six bits. Each bit position in the string maps to a match type, as shown in Table 5-2. A value of 1 indicates that the match type is valid for the associated attribute.
  • Page 62: Adding Search Support For A New Object

    Adding Search Support for a New Object “dsgw-people” subtree "full name" 111111 "" "" "last name" 111111 "" "" "phone number" "telephoneNumber" 111011 "" "" "e-mail address" "mail" 111111 "" "" "user id" "uid" 111111 "" "" "title" title 111111 ""...
  • Page 63: Creating A New Search Object

    Adding Search Support for a New Object People ““ “Search for”: “(&(objectClass=person)(objectClass=examplePerson)” “dsgw-people” subtree "full name" 111111 "" "" "last name" 111111 "" "" "phone number" "telephoneNumber" 111011 "" "" "e-mail address" "mail" 111111 "" "" "user id" "uid" 111111 ""...
  • Page 64: Modifying Default Search Filters

    Modifying Default Search Filters "dsgw-orgrole" not-used-by-dsgw not-used-by-dsgw subtree "name" “cn” 111111 "" "" "location" "l" 111111 "" "" "occupant" "roleOccupant" 111111 "" "" "description" “description” 111011 "" "" "phone number" "telephoneNumber" 111011 "" "" "is" “(%a=%v))" "is not" “(!(%a=%v)))" "sounds like" “(%a~=%v))"...
  • Page 65: Search Filters For User Data Patterns

    Modifying Default Search Filters The sections that follow explain: • Search Filters for User Data Patterns • Specifying a Search Filter for a New Object Search Filters for User Data Patterns This example shows typical search filter syntax for any search string containing the @ symbol.
  • Page 66: Customizing Search Result Templates

    Customizing Search Result Templates NOTE Make sure to place new patterns near the top of the pattern definitions for a given object. For example, in the dsgw-people entry, place customized patterns before the pattern that begins with the @ symbol. Patterns near the end of the entry are more general, and will match many different strings.
  • Page 67 Customizing Search Result Templates Figure 5-5 Search Results Table 5-3 lists the default gateway search objects and the information displayed on the search results list. Search results templates are stored in the directory and use the serverRoot/clients/dsgw/config list-<search file naming convention. object>.html Table 5-3 Default Search Results for Search Objects...
  • Page 68: Modifying Search Result Templates

    Customizing Search Result Templates Table 5-3 Default Search Results for Search Objects (Continued) Search Object Search Result Template Used Search Results Displayed Org-Units Organizational unit name, list-Org-Units.html description, and phone number Anything Name, phone number, e-mail list-Anything.html address, and description A new search result template is required for each new object class that is not a child of another object class.
  • Page 69: Removing Information From Search Results

    Customizing Search Result Templates <!-- DS_ATTRIBUTE "attr=title" --></TD> <TD NOWRAP> <!-- DS_ATTRIBUTE “attr=ou” “syntax=cis” --></TD> </TR> The additional HTML table heading syntax adds the Organizational Unit label to the heading row of the table. The additional directive syntax adds a DS_ATTRIBUTE cell to the body row of the table indicating that the information is stored in the attribute of the entry and the string is case insensitive.
  • Page 70 Customizing Search Result Templates Netscape Directory Server Gateway Customization Guide • December 2003...
  • Page 71: Chapter 6 Customizing Graphics And Color

    Chapter 6 Customizing Graphics and Color This chapter describes how to change the appearance of default gateway forms. The chapter contains the following sections: • Appearance of Gateway Forms (page 71) • Banner Image (page 72) • Button Images (page 72) •...
  • Page 72: Banner Image

    Banner Image Banner Image The default gateway banner image that appears at the top of the gateway forms is . This image can be replaced by a different banner image stored as title.gif clients/dsgw/html/title.gif Updating the Banner Image (title.gif) The following sections describe how to change the dimensions of the banner image as well as how to change the banner image filename.
  • Page 73: Updating Button Images

    Button Images Table 6-1 Button Images Button Image Description Used in the maintitle.html, stsearch_off.gif authtitle.html, csearchtitle.html, and newentrytitle.html pages Used on the searchtitle.html page stsearch_on.gif Used in the maintitle.html, adsearch_off.gif authtitle.html, searchtitle.html, and newentrytitle.html pages Used on the csearchtitle.html page adsearch_on.gif Used in the maintitle.html, newentry_off.gif...
  • Page 74: Color Schemes

    Color Schemes Color Schemes Changing the color schemes for a form requires editing the files that make up a gateway form. The procedure for changing colors depends on the gateway file type. • Files Controlling Colors on Gateway Forms • Changing Colors Using BODY Tag •...
  • Page 75: Changing Colors Using Body Tag

    Color Schemes Table 6-2 Files Controlling Appearance of Gateway Forms (Continued) To Change Colors on the Edit File Type New entry forms banner newentrytitle.html script newentryType.html script newentryName.html template display-*.html View or edit entry forms template display-*.html Changing Colors Using BODY Tag Table 6-3 lists the five standard color attributes that can be changed.
  • Page 76: Changing Table Colors

    Changing Table Colors DS_NEWENTRY_TYPE_BODY --> In the example, the attribute is a standard HTML attribute and color is an %color RGB color value in the form #rrggbb (or a standard color name, example, aquamarine). Changing Table Colors The following sections describe procedures for customizing the color of tables: •...
  • Page 77: Changing Color Of Table Headings

    Changing Table Colors Table 6-4 Sixteen Standard Colors and their Hexadecimal Values (Continued) Color Name Hexadecimal Value green #008000 lime #00FF00 olive #808000 yellow #FFFF00 navy #000080 blue #0000FF teal #008080 aqua #00FFFF Changing Color of Table Headings To change the color of table heading text, edit the following lines within the template file: <TR BGCOLOR=006666 COLSPAN=4><FONT FACE=ARIAL, HELVETICA COLOR=WHITE>...
  • Page 78 Changing Table Colors Netscape Directory Server Gateway Customization Guide • December 2003...
  • Page 79: Appendix A Parameters Defined In The .Conf File

    Appendix A Parameters Defined in the .conf File files are installed during Netscape Directory Server dsgw.conf pb.conf (Directory Server) installation. This appendix describes the configuration parameters defined in these files. Associated directives are described in Appendix B, “Gateway Directives.” authlifetime Specifies the amount of time in seconds before a user’s authentication expires in the gateway.
  • Page 80: Baseurl

    baseurl baseurl Specifies the host name and port number used to contact the Directory Server. This parameter also determines the search base used for searches performed from the gateway, and whether the gateway uses SSL to communicate with the Directory Server.
  • Page 81: Binddnfile

    binddnfile binddnfile Specifies the location of the file where the bind DN and bind password are stored. This file should be stored separately of the file for the gateway instance. The .conf is used to authenticate to the server for non-anonymous searching. binddnfile Format binddnfile binddn_filename...
  • Page 82: Format

    configdir For compatibility with HTTP clients that can’t handle an HTTP response with a parameter in the content-type, comment out this parameter in the charset .conf file. This prevents the gateway from sending an explicit charset to gateway clients. When no parameter is defined, the gateway by default transmits charset ISO-8859-1 (Latin-1).
  • Page 83: Dirmgr

    dirmgr dirmgr Specifies the distinguished name of the directory manager. This is the DN used to bind to the Directory Server when users authenticate as the directory manager from the gateway. Use a DN other than the root DN for this purpose. It is intended that the DN specified here has read and write authority for the subtree that the gateway sees.
  • Page 84: Format

    gwnametrans //// Uncomment the above DS_ATTRIBUTE directive and remove the //// //// double quotes to have aim presence in search results lists //// The modified block of text is shown below (the removed from the sixth "" line): <SCRIPT LANGUAGE="JavaScript"> <!-- Hide from non-JavaScript-capable browsers showAimIcon( <!-- DS_ATTRIBUTE "attr=nsaimid"...
  • Page 85: Format

    htmldir Format gwenametrans "HTTP_redirect" Example gwnametrans "/clients/dsgw/pbhtml/" htmldir Specifies the location of the HTML files for the gateway. These include the HTML files controlling the appearance of gateway forms. The HTML directory for the default gateway ( ) is . The HTML dsgw.conf ../html directory for Directory Express (...
  • Page 86: Include

    include include Specifies the location of another configuration file that should be read by the gateway. Format include "configuration_file" Example include "../config/dsgw-l10n.conf" location Defines the location choices selectable from the gateway when adding new entries. Each parameter represents a branch point in the directory tree below location which new entries can be added.
  • Page 87: Location-Suffix

    location-suffix location marketing "Marketing Organization" "ou=Marketing" A slightly different example defines the same location, but specifies the fully qualified distinguished name: location marketing "Marketing Organization" "ou=Marketing, o=example.com#" For a more complete example of the parameter, see “Mapping Locations location and Entry Types” on page 47. location-suffix Identifies the directory suffix used to create new entries in the directory.
  • Page 88: Example

    • groupun—corresponds to the template. Defines how display-groupun.html the gateway displays an entry of object class type groupOfUniqueNames • orgunit—corresponds to the . Defines how display-orgunit.html template the gateway displays an entry of object class type organizationalUnit • org—corresponds to the template.
  • Page 89: Format

    orgchart-attrib-farleft-rdn Format NLS libNLS_data_directory Example NLS ../../lib/nls orgchart-attrib-farleft-rdn Specifies the attribute to be used as the leftmost RDN for the DNs of user entries (in order to enable the Org Chart application to search for entries). attribute is the same as the one included in orgchart-attrib-farleft-rdn the Org Chart’s configuration file ( serverRoot/clients/orgchart/config.txt...
  • Page 90: Template

    template template Maps specific object classes to internal gateway templates. These templates define how a specific object class such as a person, a group, or an organizational unit is displayed in the gateway. The identified has a corresponding templatename HTML template stored in clients/dsgw/config/ Format template template_name object_class...
  • Page 91: Example

    vcard-property Example http://machine.example.com:24020/clients/orgchart/bin/org?context=d sgw&data= vcard-property Directory Server Gateway allows users to view vCards for person and NT person directory entries. The vCard and LDAP specifications define different labels to access information: vCards use properties and LDAP uses attributes. Therefore, there must be a way to map the vCard property names to the LDAP attribute names so that the Directory Server can locate the information for the vCard display.
  • Page 92: Example

    vcard-property • TITLE—The TITLE property specifies the job title, functional position or function of the person or resource described by the vCard. By default, TITLE is mapped to the attribute. title • TEL;WORK—The business telephone number of the person or resource described by the vCard.
  • Page 93: Appendix B Gateway Directives

    Appendix B Gateway Directives This appendix describes directives used in gateway HTML object class and search result templates. The appendix contains the following sections: • Introduction (page 93) • Context-Related Directives (page 95) • Entry-Related Directives (page 96) • Miscellaneous Directives (page 108) Introduction The display of LDAP directory information is controlled by HTML template files containing directives.
  • Page 94: Structure Of An Html Template

    Introduction Structure of an HTML Template Directory entry display, edit, and add templates generally have the following structure: <HTML> <HEAD> <!-- DS_ENTRYBEGIN --> <!-- DS_EMIT_BASE_HREF --> <!-- BODY --> <!-- DS_LAST_OP_INFO --> <!-- DS_BEGIN_ENTRYFORM --> <!-- attribute directives, e.g., --> <!-- DS_ATTRIBUTE "attr=givenName"...
  • Page 95: Context-Related Directives

    Context-Related Directives Context-Related Directives The context-related directives appear within a line, and GCONTEXT PCONTEXT are not required to appear at the beginning of a line. This is an exception to the rule. All other directives must appear at the beginning of a line, to be recognized by the Directory Server.
  • Page 96: Entry-Related Directives

    Entry-Related Directives Entry-Related Directives Entry-related directives are supported by the dosearch and edit CGIs. DS_ENTRYBEGIN Delimits the beginning of an entry. The directive is used in display DS_ENTRYBEGIN or edit templates to mark the start of an LDAP entry and in list templates to mark the beginning of a section which should be repeated for each entry which is returned by the search.
  • Page 97 Entry-Related Directives Table B-1 DS_ATTRIBUTE: Display of syntax Argument syntax Description Display As Display as a telephone number text Display as a distinguished href (a link to an LDAP entry) name Display as a mailto: URL href (mailto: URL) mail Display as a multi-line string text Display as date/time...
  • Page 98 Entry-Related Directives Table B-3 DS_ATTRIBUTE: Display of options Argument (Continued) options Display Applies only when using syntax=dn - tags are displayed when dntags showing DNs. Normally they are not displayed. Applies only when using syntax=time - only display the date, dateonly omitting the time.
  • Page 99: Examples

    Entry-Related Directives cols=number, cols=+number, cols=>number. Controls the width of the displayed attribute. If a number is given by itself, then the attribute is displayed with exactly number columns. If a plus (+) sign is given before number, then the attribute is given number extra columns.
  • Page 100: Ds_Objectclass

    Entry-Related Directives DS_OBJECTCLASS Describes the type of directory entries a given template should be used for. Arguments value=value1,value2,...valueN. Specifies a list of object class values. For a template file to be used to display a given entry, all of the values given must be values in the entry’s objectclass attribute.
  • Page 101: Example

    Entry-Related Directives Example <!-- DS_VIEW_SWITCHER --> DS_SORTENTRIES Specifies that entries should be sorted; typically used within list templates. This directive must appear within a block. Up to two DS_ENTRYBEGIN...DS_ENTRY_END directives are honored (the attribute from the first one that DS_SORTENTRIES appears is used as the primary sort key and the second one is used as a secondary sort key).
  • Page 102: Example

    Entry-Related Directives Example If a variable called is posted and contains the text John Doe, the searchstring directive: <!-- DS_POSTED_VALUE "name=searchstring" --> will produce the following HTML: VALUE="John Doe" DS_EDITBUTTON Displays a button which, when clicked, brings up an editable view of an entry. This directive must appear within a block.
  • Page 103: Ds_Savebutton

    Entry-Related Directives DS_SAVEBUTTON Displays a button which, when clicked, saves changes to an entry. Typically used in edit templates. This directive must appear within a block. DS_ENTRYBEGIN...DS_ENTRY_END Arguments label=text. Use "text" as the label on the button. If not provided, the text "Save" is used.
  • Page 104: Arguments

    Entry-Related Directives Arguments None. DS_CONFIRM_NEWPASSWORD Displays an HTML password INPUT field. The gateway compares the value supplied by the user in this field to the value in the field, and DS_NEWPASSWORD saves only the new password value if the two match. This directive must appear within a block.
  • Page 105: Ds_Begin_Entryform

    Entry-Related Directives Arguments label=text. Use "text" as the label on the button. If not provided, the text "Close Window" is used. Example <!-- DS_CLOSEBUTTON "label=Cancel" --> DS_BEGIN_ENTRYFORM Causes the gateway to emit an directive, and several hidden form HTML FORM elements which are required for proper operation of the gateway.
  • Page 106: Ds_Begin_Dnsearchform

    Entry-Related Directives Arguments label= template= attr= desc= DS_BEGIN_DNSEARCHFORM Used to edit DN-valued attributes, such as group member. Arguments None. DS_ATTRVAL_SET Display an attribute based on an "attrvset" as defined in the file. dsgw.conf Arguments set=name. Use information from attribute value set name prefix=text.
  • Page 107: Arguments For Else And Endif

    Entry-Related Directives !condition. Boolean condition; if false, include following block of text. Arguments for ELSE and ENDIF None. Table B-4 Conditions Supported for ELSE and ENDI Condition Arguments Description none Are there any entries being FoundEntries displayed? none Is the entry being edited a new entry? Adding none Are we editing an entry?
  • Page 108: Miscellaneous Directives

    Miscellaneous Directives <!-- ENDIF ----> <!-- IF "AttributeHasThisValue" "objectclass" "cis" "mailRecipient" --> // this entry is a mail recipient... do something special here <!-- ENDIF ----> Miscellaneous Directives BODY Emit HTML <BODY> element that includes color information. Arguments extrahtml Examples <!-- BODY -->...
  • Page 109: Endhtml

    Miscellaneous Directives Arguments title-string Example <!-- TITLE "Search Results" --> ENDHTML Emit </BODY></HTML> sequence Arguments None. HELPBUTTON Display a Help button (same effect as directive, but can be used DS_HELPBUTTON from any gateway directory CGI). Arguments topic Example <!-- HELPBUTTON "MODIFYPASSWD" --> INCLUDE Include the contents of another HTML file.
  • Page 110: Includeconfig

    Miscellaneous Directives INCLUDECONFIG include the contents of an HTML-based configuration file. Note that you cannot nest include directives. Arguments filename. The name of the file to include. This is relative to the directory config/ where files such as are located. dsgw.conf Example <!-- INCLUDE dsgw-orgperson.conf -->...
  • Page 111: Example

    Miscellaneous Directives Example <!-- DS_LOCATIONPOPUP "name=base" "prefix=Choose a searchbase" --> DS_GATEWAY_VERSION Emit a string containing the version of the directory gateway CGI being executed. Arguments None. Example <!-- DS_GATEWAY_VERSION --> IF/ ELSE/ ELIF/ ENDIF Same as those supported by the dosearch and edit CGIs. However, conditionals marked with an asterisk (*) are supported.
  • Page 112 Miscellaneous Directives Netscape Directory Server Gateway Customization Guide • December 2003...
  • Page 113: Appendix C Cgi Usage

    Appendix C CGI Usage This appendix provides regular expression-type descriptions of the ways to invoke the CGIs in script files. Each regular expression is followed by the variables the expression can take on a POST. Upper case words are variables. Lower case words are literals.
  • Page 114: Csearch

    csearch csearch[?context=CONTEXT[&file=FILE]] where FILE = type|attr|match|string|base searchType = SEARCHTYPE searchAttr = SEARCHATTR unauth unauth[?conetxt=CONTEXT] dnedit dnedit?CONTEXT=context&TEMPLATE=tmplname&DN=dn&ATTR=attrname& DESC=description edit edit?template&context=CONTEXT[&info=INFOSTRING] [&ADD][&dn=DN][&dnattr=ATTRNAME&dndesc=DESCRIPTION] (GETs only. No POSTs.) doauth escapedbinddn = DN authdesturl = AUTHDESTURL password = PASSWORD domodify changetype = CHANGETYPE dn = DN newrdn = RDN completion_javascript = COMPL_JS newpasswd = NEW_PASSWD...
  • Page 115: Newentry

    newpasswdconfirm = NPCONFIRM newentry newentry[?context=CONTEXT[&file=FILE]] entrytype = ET entryname = EN rdntag = RDNTAG selectLocation = SL dnsuffix = DNSUFFIX dosearch dosearch?context=BLAH[&hp=host[:port]][&dn=baseDN][&ldq=LDAPquery]] mode = MODE searchstring = SEARCH STRING type = TYPE base = BASE attr = ATTR match = MATCH attr = ATTR filterpattern = FILTERPATTERN filterprefix = FILTERPREFIX...
  • Page 116 Netscape Directory Server Gateway Customization Guide • December 2003...
  • Page 117: Index

    Index Advanced search CGIs attributes for 57 auth 113 example of pop-up menu 59 csearch 114 dnedit 114 Attributes dosearch 115 adding to object classes 51 edit 114 deleting from object classes 51 lang 113 auth CGI 113 newentry 115 Authentication search 113 and non-anonymous searching 21...
  • Page 118 DS_ATTRVAL_SET 106 Directory Server DS_BEGIN_DNSEARCHFORM 106 gateways installed with 16 DS_BEGIN_ENTRYFORM 105 updating gateway with updatedsgw script 22 DS_CLOSEBUTTON 104 updating the gateway with changes to 25 DS_CONFIRM_NEWPASSWORD 104 dirmgr parameter 83 DS_DELETEBUTTON 102 DN formats DS_DNEDITBUTTON 105 configuring 48 DS_EDITASBUTTON 103 modifying default DN format 49 DS_EDITBUTTON 102...
  • Page 119 configuring the browser for preferred language Gateway security protecting bind DN and password 25 default port setting 32 GET operations 20 seting up directory manager 32 gwnametrans parameter 84 setting suffix for adding entries 34 setting up SSL support 34 Gateway configuraton customizing Communicator’s LDAP settings 37 Gateway files...
  • Page 120 lang CGI 113 Parameters authlifetime 79 location parameter 46, 47, 86 baseurl 80 location-suffix parameter 87 binddnfile 81 changeHTML 81 charset 81 configdir 82 dirmgr 83 enable-aim-presence 83 Name translation mapping 27 gwnametrans 84 newentry CGI 115 ignoreAcceptCharsetFrom 85 newtype parameter 46, 87 location 46, 47, 86 NLS parameter 88 location-suffix 87...
  • Page 121 Search configuration files updating title.gif 72 dsgwfilter.conf 42, 56 url-orgchart-base parameter 90 dsgwsearchprefs.conf 41, 55 Search filter for new object class 65 Search filters modifying 64 user data patterns 65 vcard-property parameter 91 Search objects creating 62 creating new 63 Search preferences extending 62 Search result templates...
  • Page 122 Netscape Directory Server Gateway Customization Guide • December 2003...

Table of Contents