ICF 1.5.20.36

Example connector using RCS

Use the CSV connector to reconcile users in a remote CSV data store

This example shows reconciliation of users stored in a CSV file on a remote machine. The remote Java RCS lets IDM synchronize its repository with the remote CSV file.

The example assumes that a remote Java RCS is installed and running on a host named remote-host.

The example uses the small CSV data set provided with the Getting Started sample (hr.csv). The CSV connector runs as a remote connector on the host where the Java RCS is running. Before you start, copy the CSV data file from the Getting Started sample (/path/to/openidm/samples/getting-started/data/hr.csv) to an accessible location on the machine that hosts the remote Java RCS. For example:

cd /path/to/openidm/samples/getting-started/data/
scp hr.csv testuser@remote-host:/home/testuser/csv-sample/data/
Password:**
hr.csv     100%  651     0.6KB/s   00:00

Configure IDM for the remote CSV connector example

  1. Copy the following files to your /path/to/openidm/conf directory:

    sync.json

    A customized mapping file for this example.

    /openidm/samples/example-configurations/provisioners/provisioner.openicf.connectorinfoprovider.json

    A sample RCS configuration.

    /openidm/samples/example-configurations/provisioners/provisioner.openicf-csvfile.json

    A sample connector configuration file.

  2. Edit the RCS configuration file (provisioner.openicf.connectorinfoprovider.json) to match your network setup.

    The following example indicates that the Java RCS is running on the host remote-host, listening on the default port, and configured with a secret key of Passw0rd:

    {
        "remoteConnectorServers" : [
            {
                "name" : "csv",
                "host" : "remote-host",
                "port" : 8759,
                "usessl" : false,
                "key" : "Passw0rd"
            }
        ]
    }

    The name you set in this file will be referenced in the connectorHostRef property of the connector configuration in the next step.

    The key you specify here must match the password you set when you installed the Java RCS.

  3. Edit the CSV connector configuration file (provisioner.openicf-csvfile.json ) as follows:

    {
        "connectorRef" : {
            "connectorHostRef" : "csv",
            "bundleName" : "org.forgerock.openicf.connectors.csvfile-connector",
            "bundleVersion" : "[1.5.0.0,1.6.0.0)",
            "connectorName" : "org.forgerock.openicf.csvfile.CSVFileConnector"
        },
        ...
        "configurationProperties" : {
            "csvFile" : "/home/testuser/csv-sample/data/hr.csv"
        }
    }
    • The connectorHostRef property sets the RCS to use, and refers to the name property you specified in the provisioner.openicf.connectorinfoprovider.json file.

    • The bundleVersion : "[1.5.0.0,1.6.0.0)", must either be exactly the same as the version of the CSV connector that you are using or, if you specify a range, the CSV connector version must be included in this range.

    • The csvFile property must specify the absolute path to the CSV data file that you copied to the remote host on which the Java RCS is running.

Run the remote CSV connector example

  1. Start IDM:

    /path/to/openidm/startup.sh
  2. Verify that IDM can reach the RCS, and that the CSV connector has been configured correctly:

    curl \
    --header "X-OpenIDM-Username: openidm-admin" \
    --header "X-OpenIDM-Password: openidm-admin" \
    --header "Accept-API-Version: resource=1.0" \
    --request POST \
    "http://localhost:8080/openidm/system?_action=test"
    [
      {
        "name": "csv",
        "enabled": true,
        "config": "config/provisioner.openicf/csv",
        "objectTypes": [
          "__ALL__",
          "account"
        ],
        "connectorRef": {
          "bundleName": "org.forgerock.openicf.connectors.csvfile-connector",
          "connectorName": "org.forgerock.openicf.csvfile.CSVFileConnector",
          "bundleVersion": "[1.5.0.0,1.6.0.0)"
        },
        "displayName": "CSV File Connector",
        "ok": true
      }
    ]

    The connector must return "ok": true.

Using the Platform admin UI

  1. Sign in to the Platform admin UI (default https://localhost:8443/platform).

  2. Verify that IDM can reach the RCS and that the CSV connector is active:

    1. From the sidebar, click settings_ethernet Provisioners.

    2. On the Provisioners page, click the CSV provisioner.

      The connection status on the provisioner page displays Connected.

  3. Click the Advanced Sync tab, and select the systemCsvAccounts_managedUser mapping.

  4. Click the Reconcile tab, then click sync Reconcile Now.

    Reconcile tab of the Advanced Sync editor with a Reconcile Now button
  5. Verify the users from the remote CSV file are now in the managed user repository. Click people Identities > Manage in the sidebar, and select the people Users tab.

    The UI displays the users reconciled from the remote CSV file.

Using the legacy admin UI

  1. Log in to the legacy admin UI (default https://localhost:8443/admin).

  2. Verify that IDM can reach the RCS and that the CSV connector is active. Go to Configure > Connectors.

    The Connectors page displays the CSV connector with Active status.

    legacy admin UI Connectors page showing an active CSV connector
  3. Go to Configure > Mappings, and click the systemCsvAccounts_managedUser mapping.

  4. Click Reconcile.

  5. Verify the users from the remote CSV file are now in the managed user repository. Go to Manage > User.

    The UI displays the users reconciled from the remote CSV file.