|
||
|
|
This chapter describes the gateway functionality of Netscape Directory Server (Directory Server). The chapter contains the following sections:
- What is a Gateway?
![]()
- Directory Express and Default Gateway
![]()
- Support for Multiple Gateway Instances
![]()
- Anonymous and Non-Anonymous Searching
![]()
- Compatibility with Previous Releases of Gateway
![]()
- Automatic Updates to Directory Configuration
![]()
A gateway is an HTTP-to-LDAP client that lives on an HTTP server. Using special directives embedded in HTML files, a gateway allows users to access user directory data using any kind of web browser. Using a gateway does not require login to the Netscape Console.
In Directory Server, many gateway instances can be defined on one HTTP server, providing access to any number of Directory Servers. A gateway instance consists of the following:
- A
.conffile, stored in the serverRoot/clients/dsgw/context directory, defining the context for gateway instance. For example,dsgw.confdefines the dsgw gateway instance.![]()
- An HTML directory for object class templates and other files containing gateway directives used to communicate with Directory Server.
![]()
- 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.
![]()
For more information, see Location of Gateway Files.
The configuration file for the default gateway is at serverRoot/clients/dsgw/context/dsgw.conf.
Following Directory Server installation, the default gateway can be accessed from
http://adminHost:adminPort/ or by directly using this URL:
http://adminHost:adminPort/clients/dsgw/bin/lang?context=dsgwThe configuration file for Directory Express is serverRoot/clients/dsgw/context/pb.conf.
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/
http://adminHost:adminPort/clients/dsgw/bin/lang?context=pbHTTP Server Requirements for Gateways
A gateway instance requires an HTTP server that can communicate with Directory Server. For optimum performance and highest security, the gateway should be configured to run under a high-performance HTTP server, such as the Netscape Enterprise Server.
For more information, see HTTP Server Configuration.
Directory Express and Default Gateway
The following sections describe Directory Express and the Default Gateway in detail:
Directory Express is a basic directory lookup tool that can be used out of the box.
Figure 1-1 Directory Express: Search Result
![]()
Figure 1-2 Directory Express: Extended Search Results
![]()
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.
Support for Multiple Gateway Instances
Directory Server supports multiple gateway instancesthat is, many gateways can access directory data from the same HTTP server without conflict.
The
.conffiles defining the configuration of gateway instances are stored in the serverRoot/clients/dsgw/context directory. Within the.conffile are two parameters specifying the path names for the HTML and template files for the gateway. The following lines show the HTML and configuration directories specified in thepb.conffile:htmldir ../pbhtml
configdir ../pbconfigSpecifying Gateway Configuration to Gateway CGIs
Information about which
.conffile to use is communicated in theQUERY STRINGusing aGET, and through a hidden variable on aPOST.In a
GEToperation, gateway CGIs get the gateway context from theQUERY STRINGin the URL.Use the
GCONTEXTdirective in all URLs to gateway CGIs. Embedafter the CGI name, as shown in the example that follows. This directive will be replaced by the current CGI's gateway context. The
GCONTEXTdirective is the only gateway directive that does not have to be at the beginning of the line. An example of embedding theGCONTEXTstring in a link follows:<a href=/clients/dsgw/bin/lang?<!-- GCONTEXT -->&file=auth.html>click</a>
Similar to Directory Server Gateway 4.x, in the 6.2 release, the CGIs pass their arguments using
QUERY_STRING;QUERY_STRINGis functionally equivalent toPATH_INFO.
In a
POSToperation, the CGI posts to the gateway instance specified by a hidden variable on an HTML form. EachPOSToperation to a gateway CGI in an HTML form must use thePCONTEXTdirective so that CGIs can pass the gateway instance to the next page and maintain the state.For CGI invocations using a
POST, putat the beginning of a line. For example, you can specify
PCONTEXTin an HTML form as follows:<form method=post action=/clients/dsgw/bin/dosearch>
<input type=hidden name=dn value="">
<!-- PCONTEXT -->
</form>For more information about content-related directives, see Context-Related Directives.
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>To get to a 4.x gateway, users entered the following URL:
http://adminHost:adminPort/dsgw/bin/lang?context=<context>
In both the releases, the default gateway and Directory Express are available from the page for the Netscape Administration Server (
http://adminHost:adminPort).Anonymous and Non-Anonymous Searching
Similar to the 4.x release of the gateway, the 6.2 release of the gateway supports both anonymous and non-anonymous searching; anonymous searching provides basic permissions for accessing information in the user directory. A bind DN and bind password, stored in a
binddnfile, can be set up for users to authenticate to the Directory Server. User permissions for directory access can be defined in the Netscape Console.If the Directory Server contains authentication credentials for a user, these override the bind DN and bind password in the gateway's
binndnfileparameter. When authentication credentials expire or are invalid, the gateway attempts to authenticate the user to the directory using thebinddnfile. When nobinddnfileis specified, the gateway instance binds anonymously.The location of the
binddnfilecontaining bind DNs and bind passwords for individual users and groups of users is specified in the gateway's.conffile.
Compatibility with Previous Releases of Gateway
Release 6.2 of the gateway is compatible with the 4.x release of the gateway. Although the HTML files and gateway CGIs are not interchangeable, a 6.2 gateway can access a 4.x Directory Servera 6.2 gateway will be able to talk to a 4.x Directory Server provided the AIM presence related information is turned off in the gateway.
Note that in the 6.2 release of the gateway, the URLs have all changed. To use the 4.x HTML files with the 6.2 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. In addition, the AIM presence related information will need to removed from the HTML files.
Automatic Updates to Directory Configuration
A script that updates gateway instances with changes to Directory Server configuration,
updatedsgw, is included with the Directory Server installation. This script searches serverRoot/clients/dsgw/context for gateway instances that match the Directory Server host and port.The
updatedsgwscript runs automatically for gateways installed on the Netscape Administration Server managing the Directory Server instance. When the server port or root DN (or other settings, such as directory manager) for a Directory Server instance is changed, the Netscape Administration Server managing the Directory Server instance runs theupdatedsgwscript.For more information, see Updating the Gateway with Changes to Directory Server Configuration.
© 2001 Sun Microsystems, Inc. Portions copyright 1999, 2002-2003 Netscape Communications Corporation. All rights reserved.
Read the Full Copyright and Thrid-Party Acknowledgments.
Last Updated October 31, 2003