Understanding and Deploying LDAP Directory Services > 22. Directory Coexistence > Example 2: A Virtual Directory |
Example 2: A Virtual DirectoryIn 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
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.
|
Index terms contained in this sectionAbandon NDS virtual directory functionAdd 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. |