PingIDM

Remote proxy sync mappings

After you verify the remote proxy works, create a sync mapping to synchronize users:

Request
curl \
--header "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--header "Content-Type: application/json" \
--header "Accept-API-Version: resource=1.0" \
--request PUT \
"https://<local-instance-fqdn>/openidm/config/sync" \
--data '{
  "mappings": [
    {
      "name": "remote_to_local_user_sync",
      "source": "external/idm/<remote-instance-name>/managed/user",
      "target": "managed/user",
      "consentRequired": false,
      "properties": [
        { "target": "userName",  "source": "userName" },
        { "target": "givenName", "source": "givenName" },
        { "target": "sn",        "source": "sn" },
        { "target": "mail",      "source": "mail" },
        { "target": "password",  "source": "password" }
      ],
      "policies": [
        { "situation": "ABSENT",    "action": "CREATE" },
        { "situation": "FOUND",     "action": "UPDATE" },
        { "situation": "CONFIRMED", "action": "UPDATE" }
      ],
      "correlationQuery": [
        {
          "linkQualifier": "default",
          "expressionTree": { "any": ["userName"] },
          "type": "text/javascript",
          "file": "ui/correlateTreeToQueryFilter.js"
        }
      ]
    }
  ]
}'

To verify the mapping, get the sync configuration from the mapping configuration:

Request
curl \
--header "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--header "Accept-API-Version: resource=1.0" \
--request GET \
"https://<local-instance-fqdn>/openidm/config/sync"

Run reconciliation

After you create and verify the mapping, run a reconciliation to synchronize data across environments:

Request
curl \
--header "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--header "Content-Type: application/json" \
--header "Accept-API-Version: resource=1.0" \
--request POST \
"https://<local-instance-fqdn>/openidm/recon?_action=recon&mapping=remote_to_local_user_sync"
Response
{
  "_id": "3d5a82e4-8c91-4d3a-a3c5-b38f8e5c7a21",
  "state": "ACTIVE"
}