Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-2758

FileSource plugin: double quotes on SORID in OIS CSV file prevent processing OIS "known record" changes

    XMLWordPrintable

Details

    Description

      When a OIS CSV file has double-quotes around the SORID, then any changes to OIS known records will not be processed upon execution of future OIS sync jobs. The double-quotes are not properly stripped from the SORID when it is passed as output from the FileSource plugin for additional OIS processing.

      When the OIS diff (getChangeList()) runs in FileSourceBackend.php, it correctly finds the changed records.  But in building the array of SORIDs to return ($ret), the double-quotes around the SORID are included.  By the time that array reaches function syncOrgIdentitySource() in OrgIdentitySource.php, around line 1523, $srckey (SORID) includes the double-quotes, so the OIS record find() fails with no records found.

      The best way to address this would be to re-factor getChangeList() to use fgetcsv() instead of fgets() to read the CSV files, as this should remove the double-quotes
      .

       

      In order to replicate this, an Organizational Identity Source should be configured to use the FileSource plugin and have the the Archive Directory option configured.

      A minimal CSV file to replicate this:
      "SORID","Identifier.identifier.national","OrgIdentity.date_of_birth","OrgIdentity.valid_through"
      "111111","222222222","1900-01-01","2024-09-15"

      Attachments

        Activity

          People

            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            s.s@at.internet2.edu Seth Stein
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: