README revision b55bdee3f12a9ac6ad2d4bfb1210578151016bb1
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellSample 5 - Synchronization of Two Resources
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell-------------------------------------------
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellCopyright (c) 2012 ForgeRock AS
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellThis work is licensed under a Creative Commons Attribution-
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellNonCommercial-NoDerivs 3.0 Unported License. See
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellhttp://creativecommons.org/licenses/by-nc-nd/3.0/
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellThis sample demonstrates flowing data between external resources. It simulates
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnelltwo directory resources using XML files.
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellFor documentation pertaining to this example see:
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellhttp://openidm.forgerock.org/doc/install-guide/index.html#more-sample5
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnellTo try the sample, follow these steps.
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell 1. Copy the sample configuration and data.
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell $ cd /path/to/openidm
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell $ cp -r samples/sample5/conf samples/sample5/script .
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell 2. Start OpenIDM.
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell $ ./startup.sh
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell When you start OpenIDM, it creates a data in the new external resource
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell file that represents an AD directory, samples/sample5/data/xml_AD_Data.xml.
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings The new file is empty until you run reconciliation.
c0a2f8c6e84ddf9a597f19e5f161382b0e2cf81bDiego Colantoni
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings 3. Run reconciliation.
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell $ 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"
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell {"reconId":"b149f0e3-4bb9-4790-9266-fab2e5c80ec6"}
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell 4. Check
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell $ cat /path/to/openidm/samples/sample5/data/xml_AD_Data.xml
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell <?xml version="1.0" encoding="UTF-8"?>
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell <icf:OpenICFContainer xmlns:icf="http://openidm.forgerock.com/xml/ns/public/resource/openicf/resource-schema-1.xsd"
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell xmlns:ri="http://openidm.forgerock.com/xml/ns/public/resource/instances/resource-schema-extension"
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell xsi:schemaLocation="http://openidm.forgerock.com/xml/ns/public/resource/instances/resource-schema-extension samples/sample5/data/resource-schema-extension.xsd http://openidm.forgerock.com/xml/ns/public/resource/openicf/resource-schema-1.xsd samples/sample5/data/resource-schema-1.xsd">
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell <ri:__ACCOUNT__>
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell <ri:firstname>Darth</ri:firstname>
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell <icf:__DESCRIPTION__/>
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell <icf:__GROUPS__/>
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell <icf:__UID__>68077c05-32ae-4438-b250-d23be784ea07</icf:__UID__>
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell <icf:__NAME__>DDOE1</icf:__NAME__>
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell <ri:email>mail1@example.com</ri:email>
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell <icf:__PASSWORD__>initial_Passw0rd</icf:__PASSWORD__>
916ef74523ecddc8140815c084ab6971ee366bcfCraig McDonnell <icf:__ENABLE__/>
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell <ri:lastname>Doe</ri:lastname>
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings </ri:__ACCOUNT__>
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings </icf:OpenICFContainer>
a0f7bc4425f8e8f863d60ccd0cd909d341bb4f9eKen Stubbings
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings 5. Create a new user in the source external resource file,
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings samples/sample5/data/xml_LDAP_Data.xml, and run reconciliation again
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell to see the result show up in samples/sample5/data/xml_AD_Data.xml.
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell