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.
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) •...
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.
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...
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) •...
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.
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...
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.
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.
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>...
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.
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) •...
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.
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.
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.
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.
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...
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...
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;...
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.
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.
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”...
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.
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.
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...
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...
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: •...
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.
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.
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.
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) •...
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...
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...
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.
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:...
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> </TD> <TD> </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.
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...
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) •...
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 •...
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...
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 ““...
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.
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.
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...
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.
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...
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) •...
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.
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...
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 •...
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.
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: •...
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...
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.
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.
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...
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).
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.
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"...
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 (...
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.
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.
• 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.
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...
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...
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.
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.
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.
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"...
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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?
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 -->...
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.
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 -->...
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...
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.
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION and is the answer not in the manual?
Questions and answers