|Skip Navigation Links|
|Exit Print View|
|Configuring Project Components for Oracle Java CAPS Communication Adapters Java CAPS Documentation|
The LDAP Adapter configuration parameters, accessed from the Connectivity Map, are organized into the following sections:
The LDAP Adapter Connector Section Properties include the following parameters.
Table 20 LDAP Adapter— Connector Settings
The LDAP Adapter Connection Section Properties allow you to define the connection to the LDAP system.
Table 21 LDAP Adapter— Connection Settings
The LDAP Adapter Referrals Section Properties allow you to enter LDAP referral information.
Table 22 LDAP Adapter— Referrals Settings
A referral is an entity used to redirect a client’s request to another server. A referral contains the names and locations of other objects. It is sent by the server to indicate that the information the client has requested can be found at another location (or locations), possibly at another server or several servers.
When you execute a search operation, you may encounter a referral entry, which is just a pointer to where that information can be found. The pointer is usually in a form similar to the Provider URL configuration of the Adapter.
It consists of the following components:
Context name (optional)
You have the following options when you encounter a referral:
Ignore: Ignore the referral.
Follow: Follow the referral, that is, connect to the referred system and continue the search operation.
Throw: Throw a referral exception, which can be caught by the client and action taken as needed.
With the LDAP Adapter, you have the following properties you must set to work with referrals:
Credentials File: Enter a fully qualified path to a file. This file must contain the appropriate referral credentials information (this file has to be generated using the RCF command line utility as explained later in this section).
Follow: It is either Yes or No. Default is Yes.
The scenarios shown in the following table can arise depending on the properties provided for the referrals and the behavior of the Adapter, as explained for each of these scenarios.
Table 23 Referral Scenarios
To create a credentials file, you can use the Referral Credentials File (RCF) command-line utility.
Note - Running the RCF utility on the command line without any parameters displays how to use the utility.
netbeans_home\jdk\bin\java -cp ./stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil
The following menu displays:
C:\temp>java -cp ./stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil
Please specify the operation.
---+ RCFUtil +---
Interactive command line utility for creating and managing file(s) containing credentials information to follow LDAP referrals. File(s) generated can be used by the Java LDAP Adapter for following referrals that required credentials different from those used to create the connection to the initial LDAP server.
Usage : java com.stc.connector.ldapadapter.utils.RCFUtilOPTIONS -- <filename>
--create Create a new referral credentials file. --add Add an entry to the referral credentials file. --list Print a list of entries in the referral credentials file. --remove Remove an entry from the referral credentials file. --modify Modify an entry in the referral credentials file. --decrypt When displaying credentials, decrypt the credentials. --username <username> Specify the username; if not specified, it’ll be prompted. --password <password> Specify the password; if not specified, it’ll be prompted. --help Print this usage.
The full path to the referral credentials file.
netbeans_home\jdk\bin\java -cp ./stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil --create -- samplercf.txt
This action requests a user name and password. Enter the user name and password. This user name and password is for protecting the file itself, because the file contains sensitive credential information about other LDAP servers. For example:
C:\temp>c:\JavaCAPS6\netbeans\jdk\bin\java -cp .\stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil --create -- samplercf.txt Creating file samplercf.txt... Enter username >> test Enter password >> test File created!
A message "File created!" appears. The file name here is samplercf.txt. The extension does not matter.
netbeans_home\jdk\bin\java -cp ./stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil --add -- samplercf.txt
C:\temp>c:\JavaCAPS6\netbeans\jdk\bin\java -cp .\stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil --add -- samplercf.txt Adding a referral credentials entry... Enter username >> test Enter password >> test Enter LDAP Host >> localhost.stc.com Enter LDAP Port >> 389 Enter the Principal >> cn=Manager,dc=stc,dc=com Enter the Credentials >> secret Done.
<netbeans_home>\jdk\bin\java -cp ./stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil --list -- samplercf.txt
1> localhost.stc.com | 389 | cn=Manager,dc=stc,dc=com | l/ ZRt1cfNKc=
1> localhost.stc.com | 389 | cn=Manager,dc=stc,dc=com | secret
C:\temp>c:\JavaCAPS6\netbeans\jdk\bin\java -cp .\stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil --list -- samplercf.txt Listing entries in the referral credentials file... Enter username >> test Enter password >> test 1> localhost.stc.com | 389 | cn=Manager,dc=stc,dc=com | l/ ZRt1cfNKc= C:\temp>c:\JavaCAPS6\netbeans\jdk\bin\java -cp .\stcldap13.jar com.stc.connector.ldapadapter.utils.RCFUtil --list --decrypt -- samplercf.txt Listing entries in the referral credentials file... Enter username >> test Enter password >> test 1> localhost.stc.com | 389 | cn=Manager,dc=stc,dc=com | secret
Other operations, such as removing a credential entry and modifying a credential entry for an entry, can be done using the RCF utility in the same way.
The following example shows the content of a credentials file, samplercf.txt, with explanatory comments:
###This properties file was generated by #com.stc.connector.ldapadapter.utils.RCFUtil. #Do NOT modify this file "by hand" if you don’t understand the nature #or format of this file. Use the utility to create and #manage this file. # #Tue Feb 14 17:49:17 PST 2006 password=P9He6eCUY6Q\= localhost.stc.com\:389=test;P9He6eCUY6Q\= username=test #New credentials entry that was created.
The LDAP Adapter Security/SSL Section Properties are used to set the basic security features for SSL.
Table 24 LDAP Adapter— Security/SSL Settings
Listed are the additional notes for the following Security/SSL section properties:
Make sure that the SSL properties, including security certificate installation, port number, and so on, are set correctly for the current LDAP server.
Transport Layer Security (TLS) is a protocol that guarantees privacy and data integrity between client/server applications communicating over the Internet. The TLS operation for this Adapter supports both secure and nonsecure communication on the same connection.
However, some LDAP servers are required to start on a configured nonsecure port and cannot start on a secure port. For details, see the appropriate documentation for the LDAP server.
TLS on Demand: A feature of LDAP version 3 (StartTLS extended operation), which is supported in Java SDK version 1.4 and later. Selecting this option allows you to establish an SSL connection on demand programmatically.
Note - If you are using the TLS on Demand option, the ProviderURL property must point to a nonsecure LDAP port (the default is 389).
After selecting this option, whenever secure communication is required, you must place any method call to the LDAP server between startTLS and stopTLS calls, which can be accessed through the LDAP OTD.
In the following example, the call to performAddEntry goes through a secure communication channel, but the call to performRename goes through a nonsecure plain-communication channel:
startTLS(); performAddEntry(); stopTLS(); performRename();
Make sure that the TLS settings (in addition to the SSL settings) are configured correctly for the current LDAP server.
Note - Using the stopTLS method may cause unexpected behavior with some LDAP servers. You may need to remove the use of this method in your Collaboration Definitions. For details, see the appropriate documentation for the LDAP server.
Active Directory does not release the context, when you iteratively add a single attribute with multiple values using TLS connection. But, with the workaround of starting the TLS, adding the attribute operations and then stopping the TLS will release the context.
For information on how to use this feature with the LDAP OTD, see TLSExtension Node.
Under some circumstances, you can get different Java exceptions, depending on whether you set this property to True or False. This section explains what causes these exceptions.
For example, suppose the host name in the URL is localhost, and the host name in the server certificate is localhost.stc.com. Then, the following conditions apply:
If Verify hostname is set to False:
Host name checking between the requested URL and the server certificate is turned off.
You can use an incomplete domain host name, for example, https://localhost:444, or a complete domain host name, for example, https://localhost.stc.com:444, and get a positive response in each case.
If Verify hostname is set to True:
Host name checking between the requested URL and the server certificate is turned on.
Note - If you use an incomplete domain host name, for example, https://localhost:444, you can get the exception java.io.IOException: HTTPS hostname wrong.
You must use a complete domain host name, for example, https://localhost.stc.com:444.
Note - If the Java SDK version used by the Application Server and the corresponding Application Server property setting do not match, you can get the exception java.lang.ClassCastException.