13. Piloting Your Directory Service

Understanding and Deploying LDAP Directory Services > 22. Directory Coexistence > Example 2: A Virtual Directory

<  BACK CONTINUE  >
153021169001182127177100019128036004029190136140232051053054012003012127180003076013092

Example 2: A Virtual Directory

In this example we give a high-level description of how to develop a simple virtual directory using the Netscape Directory Server 4.0 software development kit. Our goal is to develop a virtual LDAP directory that provides access to two other LDAP directories. A more realistic example might involve providing access to an Oracle database containing human resources information. But the LDAP example is more general, and it should adequately illustrate the basics of the virtual directory.

What we're trying to build is shown in Figure 22.8. The idea is that we have two existing LDAP directories serving different directory trees. Perhaps these directories represent two companies that have now merged. Our goal is to present what appears to be a third LDAP directory but is actually the aggregation of the original two directories. We will do this by using the Netscape Directory Server virtual directory interface.

Figure 22.8 A sample virtual directory project.

The Netscape Directory Server virtual directory interface allows us to replace the directory server's existing database with one of our own. To do this fully, we need to write functions to perform the 20 tasks shown in Table 22.2.

Table  22.2. Netscape Directory Server database plug-in interfaces
Virtual Directory Function Description
Configure Process configuration file data
Bind Process LDAP bind request
Unbind Process LDAP unbind request
Search Process LDAP search request
NextSearch Process LDAP search request
Compare Process LDAP compare request
Add Process LDAP add request
Modify Process LDAP modify request
ModifyRDN Process LDAP modify RDN request
Abandon Process LDAP abandon request
Close Close down the database
Flush Flush the database
Start Initialize the database
Sequence Step through database entries
Ldif2db Convert LDIF file to a database
Db2ldif Dump database to an LDIF file
Archive2db Restore a database archive
Db2archive Archive a database
Dbsize Return the size of the database
Dbtest Interactive database test program

Our goal in this example is fairly modest: We want only to provide unauthenticated search access to the two virtual LDAP directories. There is no need for us to develop functions that authenticate, update, or perform other tasks for the directory. Luckily, the virtual directory API makes this easy. Simply omitting a function causes the front end to return an appropriate error to the client, indicating that the function is unavailable.

For our purposes, we need to implement only four functions: Search , NextSearch , Start , and Close . In addition, we could implement the Configure function if we needed any configuration information specific to a plug-in. The implementation of these functions is left as an exercise for the reader.



Understanding and Deploying LDAP Directory Services,  2002 New Riders Publishing
<  BACK CONTINUE  >

Index terms contained in this section

Abandon NDS virtual directory function
Add NDS virtual directory function
Archive2db NDS virtual directory function
Bind NDS virtual directory function
Close NDS virtual directory function
coexistence (directories)
         virtual directories
                    Netscape Directory Server 4.0 2nd 3rd 4th 5th
Compare NDS virtual directory function
Configure NDS virtual directory function
data
         directory coexistence
                    virtual directories 2nd 3rd 4th 5th
Db2archive NDS virtual directory function
Db2ldif NDS virtual directory function
Dbsize NDS virtual directory function
Dbtest NDS virtual directory function
directories
         coexistence
                    virtual directories 2nd 3rd 4th 5th
Flush NDS virtual directory function
functions
          NDS virtual directories 2nd 3rd
Ldif2db NDS virtual directory function
metadirectories
         directory coexistence
                    virtual directories 2nd 3rd 4th 5th
Modify NDS virtual directory function
ModifyRDN NDS virtual directory function
Netscape Directory Server 4.0
          virtual directories 2nd 3rd 4th 5th
                    functions 2nd 3rd
NextSearch NDS virtual directory function
Search NDS virtual directory function
Sequence NDS virtual directory function
Start NDS virtual directory function
synchronization
         directory coexistence
                    virtual directories 2nd 3rd 4th 5th
Unbind NDS virtual directory function
virtual directories
         coexistence
                    Netscape Directory Server 4.0 2nd 3rd 4th 5th

2002, O'Reilly & Associates, Inc.



Understanding and Deploying LDAP Directory Services
Understanding and Deploying LDAP Directory Services (2nd Edition)
ISBN: 0672323168
EAN: 2147483647
Year: 1997
Pages: 245

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net