Enabling Password Synchronization from Oracle Internet Directory to a Third-Party Directory

17-18 Oracle Fusion Middleware Administrators Guide for Oracle Directory Integration Platform ORACLE_HOMEldapbinldapadd -h host -p port -D binddn -q \ -v -f input.ldif

17.4 Writing Custom Synchronization Connectors

Oracle Directory Integration Platform supports custom synchronization connectors. This topic provides information to help you write custom connectors and contains the following sections: ■ Inbound Connectors ■ Outbound Connectors

17.4.1 Inbound Connectors

Perform the following steps to write an inbound connector:

1. Implement the Reader. The Reader generally extends the target system connector

class and implements the DISReadInterface. The different methods of the DISReadInterface are specified in its the javadoc. Refer to Sample Reader to see an example Reader implementation.

2. Create a sample config file. The following is a typical config file:

[INTERFACEDETAILS] Reader: Complete_classname_including_packageName SkipErrorToSyncNextChange: false SearchDeltaSize: 500 UpdateSearchCount: 100

3. Create a mapfile containing a set of mapping rules.

4. Create a properties file by setting the configfile, mapfile, and filter parameters.

To test the inbound connector: 1. Create a test profile using the register operation of the manageSyncProfiles command. Refer to Managing Synchronization Profiles Using manageSyncProfiles on page 7-15 for more information.

2. Verify your logging messages.

3. Verify synchronization occurred by examining Oracle Internet Directory to see if

the appropriate entries were created.

17.4.1.1 Sample Reader

package oracle.ldap.odip.gsi; import oracle.ldap.odip.engine.AttrHandler; import oracle.ldap.odip.engine.ChangeRecord; import oracle.ldap.odip.engine.Connector; import oracle.ldap.odip.engine.ConfigReader; import oracle.ldap.odip.engine.Constants; import oracle.ldap.odip.engine.DISReadInterface; import oracle.ldap.odip.engine.DISFilterInterface; import oracle.ldap.odip.engine.ODIException; import oracle.ldap.odip.engine.Debug; import oracle.ldap.odip.map.MapRules; import oracle.ldap.odip.map.OrclFilter; Note: You will be prompted for the password. Configuring Synchronization with a Third-Party Directory 17-19 import oracle.ldap.odip.util.Utils; Imports added for ODLLogger import oracle.core.ojdl.logging.ODLLogger; import oracle.dms.context.ExecutionContext; import oracle.core.ojdl.logging.ODLLevel; import oracle.core.ojdl.logging.ODLHandler; import java.util.logging.Handler; import java.util.logging.Level; import oracle.ldap.odip.DIPLogger; public class SampleReader implements DISReadInterface { Member variables used protected NamingEnumeration mEnumerate; protected Attributes mAttribs; protected Attribute mAttrib; protected Attribute mAttribAllValues; protected SearchResult mResult; protected MapRules mMapRules; Vector to store the list of required attributes protected Vector mReqAttrList = new Vector; List of source attributes whose changes need to be mapped protected Vector mSrcAttrList = new Vector; protected String mMapFilter; protected int mAppliedChangeNum = 0; protected int mAvailableChangeNum = 700; protected DISFilterInterface mFilter; LastChangeNumber that is read protected String mReadChangeNum; List of attributes to be returned in changelog LDAPSearch protected String[] mRetAttribs; private int mErrorCode = 0; Constructor public SampleReader { } Constructor with the connector