Summary of Contents for Netscape NETSCAPE DIRECTORY SERVER 7.0 - GATEWAY CUSTOMIZATION
Page 1
Gateway Customization Guide Netscape Directory Server Version 7.0 October 2004...
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 13) • Conventions Used in This Book (page 14) •...
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 Monospaced font computer 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 Deployment Guide. Contains procedures for the day-to-day maintenance of your directory service. Includes information on configuring server-side plug-ins. • Netscape Directory Server Installation Guide. Contains procedures for installing your Directory Server as well as procedures for migrating your Directory Server.
Page 16
Related Information Netscape Directory Server Gateway Customization Guide • October 2004...
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 17) • Directory Express and Default Gateway (page 19) • Support for Multiple Gateway Instances (page 21) •...
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 or by directly using this URL: adminHost adminPort http:// /clients/dsgw/bin/lang?context=dsgw Directory Express The configuration file for Directory Express is serverRoot/clients/dsgw/context/pb.conf During Directory Server installation, Directory Express is configured to use the Netscape Administration Server installed with the directory as its HTTP server. Following Directory Server installation, Directory Express can be accessed from http://adminHost:adminPort/ or directly using this URL:...
Page 20
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 • October 2004...
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 —...
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 URLs for Gateway Access To access a gateway, users enter the following URL: http://adminHost:adminPort/clients/dsgw/bin/lang?context=<context> The default gateway and Directory Express are available from the page for the Netscape Administration Server ( http://adminHost:adminPort Anonymous and Non-Anonymous Searching The gateway supports both anonymous and non-anonymous searching.
Automatic Updates to Directory Configuration The URLs have changed compared to 4.x releases. To use the 4.x HTML files with the current binaries, the files will need to be updated to use the new URL scheme. Similarly, to use the new HTML files with the 4.x binaries, the URLs will need to be changed to the old style in the HTML files.
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 25) • HTTP Server Configuration (page 28) •...
Gateway Installation Planning Two gateway instances are installed during Directory Server installation: Netscape Directory Express (Directory Express) and the default gateway. The configuration files ( ) for the two instances are stored in pb.conf dsgw.conf directory. Additional gateways can be serverRoot/clients/dsgw/context created by customizing Directory Express or the default gateway.
Gateway Installation Planning Protecting Bind DN and Password The gateway configuration files reference files that contain sensitive information, including the parameter containing the bind DN and bind password binddnfile used to permit non-anonymous searching of the directory. The should binddnfile not be stored under the gateway configuration directory ( serverRoot/clients/dsgw or in any directory that is served up over HTTP.
HTTP Server Configuration There are many factors affecting gateway performance on an HTTP server, including the following: • The number of users accessing the gateway at a given time. • The complexity of the directory searches performed and the search results required.
HTTP Server Configuration • Gateway Root Suffix • Configuring the Gateway for Web Servers Name Translation Mapping The HTTP server uses Name Translation mapping to translate a virtual path provided by a gateway client to a physical path used by an HTTP server. This Name Translation mapping specifies the gateway’s HTML directory.
Page 30
HTTP Server Configuration Changing all the host names and port numbers in the configuration files , and so on). config.txt dsgw.conf pb.conf default.conf Adding the following CGI directories (under Program Management). Prefix: /clients/dsgw/bin CGI Directory: serverRoot/clients/dsgw/bin (On Windows, add them as shell CGI directories.) Adding an additional Document directory (under Content Management).
Page 31
HTTP Server Configuration Add an additional document directory. Adding an additional document directory is necessary to establish access to the gateway files. For additional information, see http://enterprise.netscape.com/docs/enterprise/611/admin/esco ntnt.htm#22280 From the Class Manager for the Netscape Enterprise Server: Select Content Management > Additional Document Directories. In the URL Prefix field, enter this: clients/dsgw In the Map to Directory field, enter this (replace...
Creating a New Gateway Instance webserverHost webserverPort http:// /clients/dsgw/bin/search where is the HTTP server’s hostname and is the webserverHost webserverPort port number used by the server. When the HTTP server is using the standard HTTP port number (80), the port number does not need to be included in the URL.
Gateway .conf File Configuration Edit the parameters in to point to the htmldir configdir example.conf new HTML and template directories. To access the new gateway instance (in this example, ) navigate example.conf the browser to this URL: adminHost adminPort http:// /clients/dsgw/bin/lang?context=example Gateway Cloning The HTML and template directories for one gateway can serve as the HTML and...
Gateway .conf File Configuration Setting Up a Directory Manager for the Gateway When Directory Server is installed, a default Directory Manager account ) is setup with permissions to the root DN. The Directory cn=Directory Manager Server installation requires a root DN. If no root DN was configured when the Directory Server was installed, then no default Directory Manager is configured for the gateway.
Gateway .conf File Configuration Authenticating as Directory Manager Figure 2-1 shows the authentication login screen for the default gateway. Administrators can use it to authenticate as the Directory Manager. The Authenticate as Directory Manager button is displayed only when a Directory Manager has been configured for the gateway.
Configuring Gateway Clients Setting Up SSL Support When the Directory Server is installed, the gateway is configured to communicate with the Directory Server using a non-SSL host name and port number. This information is stored in the parameter. baseurl Configuring the gateway to use SSL when communicating with the Directory Server requires modification of the parameters in securitypath...
Configuring Gateway Clients • Language Support for HTTP Clients • Displaying a Non-English Alphabet • Configuring Netscape 7.x for Preferred Language • Customizing Communicator’s LDAP Settings 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 —...
Configuring Gateway Clients Set the appropriate font type, size, and display resolution. 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].
Chapter 3 Gateway Localization This chapter describes gateway localization and identifies the tasks required to set up additional gateway locales. The chapter contains the following sections: • Unicode and Netscape Support for UTF-8 (page 39) • How the Gateway Selects a Character Set (page 40) •...
How the Gateway Selects a Character Set How the Gateway Selects a Character Set The gateway can output web pages in many character sets. The gateway selects a character set for each HTTP client based on a combination of input from the client and from the gateway's configuration files.
Special Characters HTTP Clients that Do Not Request UTF-8 For browsers that do not request UTF-8 by default, the gateway selects a character set from request header or from the request header, Accept-Charset Accept-Language depending on the HTTP client. Some HTTP clients don't request any character set information. For these clients, the gateway's charset parameter definition is the default.
Gateway Locales This works around a problem with Japanese NT, which garbles environment variables that are in UTF-8 (or any charset except ). The Web server passes information to Shift_JIS the gateway CGI programs in environment variables, but the query string environment variable is URL-encoded, so it can handle UTF-8 (from Windows' point $QUERY_STRING...
Setting Up Locales for Translation dsgw-l10n.conf provides translation in the Search and Advanced Search pull-down dsgw-l10n.conf menus for the default gateway ( ). If is not present in the dsgw.conf dsgw-l10n.conf directory, translation of the UI does not occur and English characters /config/lang appear in the pull-down menus for Standard Search and Advanced Search.
Page 44
Setting Up Locales for Translation Netscape Directory Server Gateway Customization Guide • October 2004...
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 4-1. Table 4-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 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 6, “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 generate HTML forms dynamically 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 4-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 6, “Search Attributes, Filters, and Results,” describes how search result templates can be edited to modify the display of search results.
Chapter 5 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. dsgw.conf The chapter contains the following sections: • Entry Types (Object Classes) (page 51) •...
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 Configuring DN Formats for Entry Types The following sections describe how to configure entry type DNs depending upon the format. UID-Based DN When a person or NT person entry is added to the directory, the gateway prompts for a unique DN.
Object Class Attributes in Template Files • Extending Object Classes • Creating a New Parent Object Class Default Gateway Object Classes The default gateway supports the object classes listed in Table 5-1. Table 5-1 Default Object Classes Default Gateway Object Class Related Template File domain component display-dc.html...
Object Class Attributes in Template Files directives begin with a tag and close with a DS_ATTRIBUTE DS_ENTRYBEGIN tag. DS_ENTRYEND Appendix B, “Gateway Directives,” lists the possible arguments for the directive. DS_ATTRIBUTE 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.
Object Class Attributes in Template Files Adding a Template for a Child of a Parent Class The easiest way to create a new object class is to extend an existing object class template, adding and deleting attributes as necessary. The following example shows the steps required to add a template for a new object class, examplePerson The new template adds two custom attributes,...
Object Class Attributes in Template Files </B></TD> <TD VALIGN="TOP">Preferred OS</TD> <TD VALIGN="TOP"><B> <!-- DS_ATTRIBUTE "attr=preferredOS" "cols=>6" --> </B></TD></TR> For more information on adding attributes, see “Object Class Attributes in Template Files,” on page 55. Define a parameter in for the object class template dsgw.conf examplePerson...
Page 61
Object Class Attributes in Template Files Create a new search results form defining how the gateway will display search results for the new object class. NOTE Modify an existing search result form to create a new search results form. See “Adding Information to Search Results,” on page 76, and “Removing Information from Search Results,”...
Page 62
Object Class Attributes in Template Files Netscape Directory Server Gateway Customization Guide • October 2004...
Chapter 6 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 63) •...
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 6-1 Valid Search Scopes Search Scope Tells the Gateway to... Search the Directory Server for the entry specified in the base baseurl parameter but not to search in children of the entry. Not to search in the entry specified in the baseurl parameter but onelevel search in the most immediate children of the entry.
Page 66
Modifying Search Attributes for Advanced Searches Figure 6-1 Advanced Search Form: Search Results The figures that follow show the matching patterns that can be selected in the Advanced Search form. Figure 6-2 shows the entry type pop-up menu on the Advanced Search form. Netscape Directory Server Gateway Customization Guide •...
Page 67
Modifying Search Attributes for Advanced Searches Figure 6-2 Advanced Search Form: Entry Type Figure 6-3 shows the attribute pop-up menu on the Advanced Search form. Figure 6-3 Advanced Search Form: Attribute Figure 6-4 shows the matching filter pop-up menu on the Advanced Search form. Chapter 6 Search Attributes, Filters, and Results...
Modifying Search Attributes for Advanced Searches Figure 6-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 telephoneNumber mail title for 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 6-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.
Customizing Search Result Templates Figure 6-5 Search Results Table 6-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 6-3 Default Search Results for Search Objects...
Customizing Search Result Templates Table 6-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 78
Customizing Search Result Templates Netscape Directory Server Gateway Customization Guide • October 2004...
Chapter 7 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 79) • Banner Image (page 79) • Button Images (page 80) •...
Button Images 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. Changing Dimensions of Banner Image The default Netscape banner image has a height of 40 pixels and a width of 530 pixels.
Button Images Table 7-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 NOTE Any image used to replace must be a true button image .gif image. Images in other formats (PICT, EPS, BPX, TIFF) will not appear as intended. Color Schemes Changing the color schemes for a form requires editing the files that make up a gateway form.
Color Schemes Table 7-2 Files Controlling Appearance of Gateway Forms (Continued) To Change Colors on the ... Edit File Type Advanced search forms banner csearchtitle.html script csearchAttr.html script csearchBase.html script csearchMatch.html script csearchString.html script csearchType.html HTML emptyFrame.html search result list-*.html New entry forms banner newentrytitle.html...
Color Schemes To adjust background colors in the banner files and other standard HTML files, edit the HTML to change the color associated with the BGCOLOR TEXT attributes to a different RGB color value. (For example, to change background to aquamarine and text to white, use <BODY BGCOLOR="#70DB93"...
Color Schemes • Use a color name. There are sixteen standard case-insensitive color names. Table 7-4 lists the sixteen standard color names and their equivalent RGB values. Table 7-4 Sixteen Standard Colors and Their Hexadecimal Values Color Name Hexadecimal Value black #000000 silver...
Color Schemes Changing the Background Color of Table Rows To change the color of the table body rows, edit the following line for each table within the template file: <TABLE CELLSPACING="2" BORDER BGCOLOR=#F2F2F2 ... so that the attribute specifies the RGB color value in the form #RRGGBB BGCOLOR or a standard color name representing the new color.
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. Format baseurl [ldap | ldaps]://dirHost:dirPort/searchBase ldap | ldaps.
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.
enable-aim-presence "" //<!-- DS_ATTRIBUTE "attr=nsaimstatustext" "options=quoted" --> //// 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 ""...
gwnametrans gwnametrans Used by the gateway CGI scripts to specify the URL to output for HTTP redirection. This needs to be specified as "/clients/dsgw/<htmldir>" should be the same as the set in the HTTP server, if any is being used. NameTrans Format gwenametrans "HTTP_redirect"...
include Example ignoreAcceptCharsetFrom Mozilla/4.01x-NSCP Mozilla/3 More information: “charset,” on page 89. 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.
location-suffix dn. The distinguished name (DN) representing this branch point in the directory. If this value is not terminated with a pound sign, the value specified on the include parameter is appended to this value to build the fully qualified distinguished name.
newtype newtype Defines the types of entries that can be added to the directory using the gateway. also defines the locations in the directory where an entry type can be newtype added. For a user to create the entry, the corresponding location must be defined using the parameter.
Example The following example allows persons to be added to the Marketing subtree using the template for organizationalPerson newtype orgperson"Person"cn marketing For a more complete example of the parameter, see “Mapping Locations newtype and Entry Types,” on page 53. Identifies the libNLS data directory, which should contain a directory named “locales,”...
securitypath securitypath Identifies the location of the certificate database used by the gateway when using SSL to communicate with the Directory Server. The certificate database contains the Certificate Authority issuing the certificate for the Directory Server. Format securitypath "/usr/netscape/servers/alias/cert.db" Example securitypath "/usr/netscape/servers/alias/pb-cert.db"...
vcard-property Note that the Org Chart application also has a similar URL which points to the Directory Server Gateway (the instance). You can change it to dsgw to have the Org Chart link to the Phonebook or remove ../lang?context=pb altogether and have it link to the default gateway instance context=dsgw , which is the instance).
Page 100
vcard-property • ORG — The ORG property may refer to the organizational name and units of the person or resource associated with the vCard. By default, ORG is mapped to the attributes. • ROLE — The ROLE property may refer to the role, occupation or business category of the person or resource described by the vCard.
vcard-property ldapattr [ldapattr2...]. The attribute(s) to be mapped to the vCard property. This is useful when mapping a vCard property to a custom attribute. Example The following example changes the mapping of the NOTE property from the default attribute to a custom attribute named description hobbies vcard-property NOTE mls hobbies...
Page 102
vcard-property Netscape Directory Server Gateway Customization Guide • October 2004...
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 103) • Context-Related Directives (page 105) • Entry-Related Directives (page 106) • Miscellaneous Directives (page 118) 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 are GCONTEXT PCONTEXT 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 DS_ENTRYBEGIN display 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 107
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 108
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 displays 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 that number of columns. If a plus (+) sign is given before the number, then the attribute is given that number number of extra columns.
Entry-Related Directives DS_OBJECTCLASS Describes the type of directory entries for which a given template should be used. 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 object class 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_ENTRYEND 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 DS_ENTRYBEGIN... block. DS_ENTRYEND 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 ENDIF 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 Examples <!-- IF "!DirectoryIsLocalDB" --> The entry was last modified by <!-- DS_ATTRIBUTE "attr=modifiersName" "syntax=dn" "defaultvalue=N/A" "options=readonly" --> <!-- ENDIF ----> <!-- IF "AttributeHasThisValue" "objectclass" "cis" "mailRecipient" --> // this entry is a mail recipient... do something special here <!-- ENDIF ---->...
Miscellaneous Directives TITLE Emit HTML <HEAD>, <TITLE>, and <BODY> elements. 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...
Miscellaneous Directives Example <!-- INCLUDE extra.html --> INCLUDECONFIG Include the contents of an HTML-based configuration file. You cannot nest directives. include Arguments filename. The name of the file to include. This is relative to the directory config/ where files such as are located.
Miscellaneous Directives Arguments name=varname. The name of the form element that is emitted. prefix=select_prefix. Text that is output before a select element. suffix=select_prefix. Text output after a select element. 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.
Page 122
Miscellaneous Directives Netscape Directory Server Gateway Customization Guide • October 2004...
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 131
Search configuration files updating title.gif 80 dsgwfilter.conf 48, 64 url-orgchart-base parameter 98 dsgwsearchprefs.conf 47, 63 UTF-8 39 Search filter for new object class 73 Search filters modifying 72 user data patterns 73 Search objects vcard-property parameter 99 creating 70 creating new 71 Search preferences extending 70 Search result templates...
Page 132
Netscape Directory Server Gateway Customization Guide • October 2004...
Page 133
Tables Location of gateway files for current releases ............24 Location of gateway files for release 4.x ..............24 Gateway File Types and Locations ................40 Default Template Files and Related Object Classes ..........42 Gateway Forms and Corresponding Script Files ............43 Default Search Result Templates ................
Page 134
ii Netscape Directory Server Installation Guide October 2004...
Page 135
Examples HTML and configuration directories specified in pb.conf ......... 6 Embedding GCONTEXT in a Link ................7 Specifying PCONTEXT in an HTML Form .............. 7 Setting up .conf file and directories for new gateway instance ........ 21 Changing LDAP port in the baseurl parameter ............23 Specifying the Path for Certificate Database ............
Page 136
ii Netscape Directory Server Installation Guide...
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 7.0 - GATEWAY CUSTOMIZATION and is the answer not in the manual?
Questions and answers