README revision b55bdee3f12a9ac6ad2d4bfb1210578151016bb1
303N/ASample 6 - LiveSync Between Two LDAP Servers
303N/A--------------------------------------------
303N/ACopyright (c) 2012 ForgeRock AS
303N/AThis work is licensed under a Creative Commons Attribution-
303N/ANonCommercial-NoDerivs 3.0 Unported License. See
303N/Ahttp://creativecommons.org/licenses/by-nc-nd/3.0/
303N/A
303N/AThis sample demonstrates use of two real LDAP connections, and both
303N/Areconciliation and LiveSync. To simplify setup, both provisioners point to the
303N/Asame LDAP server, and only use different base DNs, so you can simulate use of
303N/Atwo directory servers with a single OpenDJ directory server, for example.
303N/A
303N/AFor documentation pertaining to this example see:
303N/Ahttp://openidm.forgerock.org/doc/install-guide/index.html#more-sample6
303N/A
303N/ATo prepare to run the sample, download OpenDJ directory server from
303N/Ahttp://forgerock.org/opendj.html. Install OpenDJ using QuickSetup:
303N/A
303N/A * Use "password" as the password for cn=Directory Manager.
303N/A * When presented with Topology Options, be sure to choose "This server
844N/A will be part of a replication topology" to ensure the change log is set
303N/A up.
303N/A * Import samples/sample6/data/Example.ldif during installation.
303N/A * After OpenDJ installation completes, click Launch Control Panel, then
303N/A use the New Base DN... window to create ou=people,o=ad and import
303N/A samples/sample6/data/AD.ldif into the same userRoot database as
303N/A you used by default for Example.ldif.
303N/A
303N/AThe directory server should now show one user under dc=example,dc=com with DN,
844N/Auid=jdoe,ou=People,dc=example,dc=com, and no other entries under ou=people,o=ad.
844N/A
303N/ATo run the sample in OpenIDM, follow these steps.
1258N/A
303N/A 1. Copy the sample configuration and data.
303N/A
303N/A $ cd /path/to/openidm
303N/A $ cp -r samples/sample6/conf .
303N/A
303N/A 2. Edit conf/provisioner.openicf-ad.json to change the port from 4389 to
303N/A 1389 (or other port number where OpenDJ listens for LDAP).
303N/A
303N/A 3. Start OpenIDM.
303N/A
303N/A $ ./startup.sh
303N/A
303N/A 4. Run reconciliation.
303N/A
303N/A $ curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request POST "http://localhost:8080/openidm/sync?_action=recon&mapping=systemLdapAccounts_managedUser"
303N/A {"reconId":"d88ca423-d5f2-4eb5-a451-a229399f92af"}
303N/A
303N/A 5. Check that the user was added under ou=people,o=ad.
303N/A
303N/A $ cd /path/to/OpenDJ/bin
303N/A $ ./ldapsearch -p 1389 -b ou=people,o=ad "(uid=jdoe)"
303N/A dn: uid=jdoe,ou=people,o=ad
303N/A objectClass: person
303N/A objectClass: inetOrgPerson
303N/A objectClass: organizationalPerson
303N/A objectClass: top
303N/A givenName: John
303N/A description: Created for OpenIDM
303N/A uid: jdoe
303N/A cn: John Doe
303N/A sn: Doe
303N/A mail: jdoe@example.com
303N/A
303N/A 6. Edit conf/scheduler-activeSynchroniser_systemLdapAccount.json to set
303N/A "enabled" : true. LiveSync causes synchronization to happen as you
303N/A make changes.
303N/A
303N/A 7. Using the OpenDJ Control Panel, add a new user under
303N/A ou=People,dc=example,dc=com, and then check the result under
303N/A ou=people,o=ad.
$ ./ldapsearch -p 1389 -b ou=people,o=ad "(uid=*)" cn description
dn: uid=jdoe,ou=people,o=ad
description: Created for OpenIDM
cn: John Doe
dn: uid=bdobbs,ou=people,o=ad
description: Created to see LiveSync work
cn: Bob Dobbs