5 Creating Oracle Virtual Directory Adapters

In this exercise, you use Oracle Directory Services Manager to create a local store and add an entry to it. Then you create an adapter for an LDAP directory and an adapter for a database.

5.1 Before you Begin

The prerequisites for setting up Oracle Virtual Directory adapters are as follows:

  • An instance of Oracle Directory Services Manager. You need to know the URL.

  • An instance of Oracle Virtual Directory

  • An instance of Oracle Internet Directory with some user entries. You can use the instance from the Oracle Internet Directory tutorial.

  • An Oracle Database. For this exercise, you can use the Oracle Database associated with Oracle Internet Directory, although you would not do that on a production system. When an Oracle Database is installed, it already has the HR example scema that we will use in this exercise.

  • For the Oracle Virtual Directory, Oracle Internet Directory, and Oracle Database, you will need to supply the following information:

    • Hostname

    • Port

    • Administrator's name

    • Password

5.2 Creating a Local Store Adapter

Create Local Store Adapter dc=oracle,dc=com, as follows:

  1. Access Oracle Directory Services Manager, as described in "Accessing Oracle Directory Services Manager".

  2. Click the Adapter tab. On the Adapter page:

    1. Click the Create Adapter icon and choose Local Store Adapter.

    2. Enter the Adapter name LSA.

    3. Leave Template set to Default.

    4. Click Next.

  3. On the Settings page:

    1. Enter the Adapter Suffix/Namespace dc=oracle,dc=com.

    2. Enter data/localDB for Database File.

    3. Use the default values for the rest of the fields on the Settings page.

    4. Click Next.

  4. Review the summary page and click Finish if everything looks correct.

Note:

If, for some reason, you decide to delete the adapter and create a new one, use a different Adapter name and a different Database File name.

5.3 Adding Entries

Create an entry in the local store as follows:

  1. Using a text editor, create an LDIF file that looks like this:

    version: 1
    
    dn: dc=oracle,dc=com
    objectclass: top
    objectclass: domain
    dc: oracle
    
  2. Access Oracle Directory Services Manager, as described in "Accessing Oracle Directory Services Manager".

  3. Click the Data Browser tab.

  4. Highlight dc=oracle,dc=com under Client View.

  5. Click the Import LDIF icon.

  6. Browse to the LDIF file you created and click Open.

5.4 Creating an LDAP Adapter

Create LDAP adapter as a branch cn=Users,dc=mydomain,dc=com).

  1. Access Oracle Directory Services Manager, as described in "Accessing Oracle Directory Services Manager".

  2. Click the Adapter tab. On the Adapter page:

    1. Click Create Adapter icon and choose LDAP

    2. Since we will be connecting to an OID server, leave the adapter template at Default.

    3. Enter LDAP as name

    4. Click Next.

  3. On the Connection Page:

    1. Click the Add Host icon.

    2. Leave Use DNS for Auto Discovery set to No.

    3. Enter hostname and port values for your LDAP server.

    4. For server proxy Bind DN and proxy password enter the admin DN (typically cn=orcladmin) and password for your LDAP server.

    5. Use the default values for the rest of the fields on the page.

    6. Click Next.

  4. You should see Success!! Oracle Virtual Directory connected to all hosts. on the Connection Test page. Click Next.

  5. On the Name Space page:

    1. SetPassThrough Credentials to Always.

    2. Set the remote base to where you wish to connect in the remote directory tree. Browse to the Users container, cn=Users,dc=mydomain,dc=com

    3. Set the Mapped Namespace to ou=LDAP,dc=oracle,dc=com

    4. Use the default values for the rest of the fields on the page.

    5. Click Next.

  6. Review the Summary page. Click Finish.

  7. Click the Data Browser tab. On the Data Browser page;

    1. Click the Refresh icon

    2. Expand the containers under Adapter Browser to view the entries.

    3. Expand ou=LDAP,dc=oracle,dc=com under Client View to view the entries as they appear to a client.

  8. Click the Adapter tab.

  9. Highlight the LDAP adapter and click the Routing tab. On the Routing tab:

    1. Under General Settings, select No for Visibility so that this adapter will look like a normal branch to an LDAP client.

    2. Click Apply.

  10. Go to the Data Browser tab, refresh and verify that the data tree from the LDAP adapter is visible.

  11. Expand the containers under Client View to see if they have changed.

5.5 Creating an Oracle Database Adapter

Create a database adapter that maps the Oracle DB sample HR schema as a branch, as follows:

  1. Access Oracle Directory Services Manager, as described in "Accessing Oracle Directory Services Manager".

  2. Click the Adapter tab. On the Adapters page:

    1. Click the Create Adapter icon. The Adapter navigation tree appears.

    2. Select Database from the Adapter Type list.

    3. Enter DB as adapter name

    4. Leave the Adapter Template set to Default.

    5. Click Next. The Connection screen appears.

  3. On the Connection screen:

    1. For Adapter Suffix/Namespace, enter ou=db,dc=oracle,dc=com.

    2. For URL type, select Use Predefined Database.

    3. For Database type, select the proper driver type for your database, such as Oracle Thin Drivers. JDBC Driver Class and Database URL will fill in automatically.

    4. For Host, enter the hostname/IP address of your database (sta00730)

    5. For Port, enter the port of your database (5521)

    6. For Database name, enter dapmain.

    7. For Database user, enter HR.

    8. For Database password, enter the password. (welcome1)

    9. Click Next which takes you to the Mapped Database Tables page.

  4. On the Mapped Database Tables Page:

    1. Click Browse.

    2. Scroll down to HR, expand the container, and click EMPLOYEES.

    3. Click OK. The Map Database Tables page will now show HR.EMPLOYEES.

    4. Click Next to go to the Map Object Classes page.

  5. On the Map Object Classes page:

    1. Click the Create a New Object Class icon.

    2. Enter Object Class inetorgperson.

    3. Enter RDN Attribute UID.

    4. Click OK.

  6. Highlight the object class you just created and click the Add Mapping Attribute icon.

  7. On the Add Mapping Attribute page:

    1. Enter the LDAP attribute uid and the Database Table:Field HR.EMPLOYEES:EMAIL

    2. Leave Datatype blank.

    3. Click OK.

    4. Map the LDAP iterate givenname to HR.EMPLOYEES:FIRST_NAME.

    5. Click Next.

  8. Click Finish. The new DB adapter appears on the Adapter page.

  9. On the Adapter page, select the new Database adapter and click the Routing tab.

  10. On the Routing page:

    1. Under General Settings, select No for Visibility so that this adapter will look like a normal branch to an LDAP client.

    2. Select DB adapter criticality False so that if DB is not available OVD still responds

    3. Click Apply.

5.6 Verify Adapters

You should see three adapters listed on the left side of the Adapter page, one for Local store, one for LDAP and one for Database adapter.

Click on each adapter to make sure that it displays the correct namespace and configuration information you set in the adapter configuration setup.

Go to the Data Browser, click the refresh icon, and observer the Client View and Adapter Browser.