000038770 - Generic REST Collector fails with 'com.aveksa.client.genericrest.GenericRestException: UNEVEN_JSON_PATH_CONFIGURATION' in RSA Identity Governance & Lifecycle

Document created by RSA Customer Support Employee on Apr 23, 2020
Version 1Show Document
  • View in full screen mode

Article Content

Article Number000038770
Applies ToRSA Product Set: RSA Identity Governance & Lifecycle
RSA Version/Condition: 7.2.0
 
IssueA test of a Generic REST Collector that parses an uneven JSON array structure fails with the following error (Collectors > Collector Type > {Collector Name} > Test button):
 

Collector test failed:
com.aveksa.server.runtime.ServerException: Test request failed with response: com.aveksa.server.runtime.ServerException: com.aveksa.common.DataReadException: com.aveksa.client.genericrest.GenericRestException: UNEVEN_JSON_PATH_CONFIGURATION {$.Resources[*].active=5, $.Resources[*].userName=5, $.Resources[*].[*].workerInformation.personNumber=0}. Caused by com.aveksa.client.genericrest.GenericRestException: UNEVEN_JSON_PATH_CONFIGURATION {$.Resources[*].active=5, $.Resources[*].userName=5, $.Resources[*].[*].workerInformation.personNumber=0} Caused By Stack com.aveksa.common.DataReadException: com.aveksa.client.genericrest.GenericRestException: UNEVEN_JSON_PATH_CONFIGURATION {$.Resources[*].active=5, $.Resources[*].userName=5, $.Resources[*].[*].workerInformation.personNumber=0} at com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataIterator.next(GenericRESTAccountDataIterator.java:71) at com.aveksa.client.datacollector.collectors.accountdatacollectors.AccountDataCollector.collectData(AccountDataCollector.java:422) at com.aveksa.client.datacollector.collectors.accountdatacollectors.AccountDataCollector.collect(AccountDataCollector.java:302) at com.aveksa.client.datacollector.collectors.accountdatacollectors.AccountDataCollector.collectTestData(AccountDataCollector.java:277) at com.aveksa.client.datacollector.framework.DataCollectorManager.collect(DataCollectorManager.java:481) at com.aveksa.client.component.collector.DefaultCollectorManager.actUpon(DefaultCollectorManager.java:204) at com.aveksa.client.component.collector.DefaultCollectorManager.handle(DefaultCollectorManager.java:102) at com.aveksa.client.component.event.DefaultEventManager.handle(DefaultEventManager.java:75) at com.aveksa.client.datacollector.framework.SimpleEventSource.notifyListeners(SimpleEventSource.java:67) at com.aveksa.client.component.communication.DefaultCommunicationManager.notifyEvent(DefaultCommunicationManager.java:377) at com.aveksa.client.component.communication.ChangeListHandler.applyChanges(ChangeListHandler.java:364) at com.aveksa.client.component.communication.ChangeListHandler.access$300(ChangeListHandler.java:58) at com.aveksa.client.component.communication.ChangeListHandler$ChangeApplyingRunnable.run(ChangeListHandler.java:275) at java.lang.Thread.run(Thread.java:748) Caused by: com.aveksa.client.genericrest.GenericRestException: UNEVEN_JSON_PATH_CONFIGURATION {$.Resources[*].active=5, $.Resources[*].userName=5, $.Resources[*].[*].workerInformation.personNumber=0} at com.aveksa.client.genericrest.GenericRestException.parsingError(GenericRestException.java:100) at com.aveksa.client.genericrest.postprocessor.response.JSONResponseHandler.parseResponseForDataCount(JSONResponseHandler.java:64) at com.aveksa.client.genericrest.postprocessor.response.JSONResponseHandler.parseResponseForData(JSONResponseHandler.java:108) at com.aveksa.client.genericrest.postprocessor.impl.GenericRESTPostprocessorImpl.getParsedData(GenericRESTPostprocessorImpl.java:90) at com.aveksa.client.genericrest.GenericRESTClient.executeTestCollection(GenericRESTClient.java:173) at com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataIterator.collectAccountData(GenericRESTAccountDataIterator.java:155) at com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataIterator.next(GenericRESTAccountDataIterator.java:68) ... 13 more End Stack



In the following example the JSON array contains workerinformation only if the account is linked to an identity. Service accounts do not have workerinformation. This results in an uneven JSON array where the service accounts have less array elements than the identity accounts. Note that identity account cblossom has workerinformation and service accounts fa_operator and fa_guest do not have workerinformation.
 

{
  "itemsPerPage" : 50,
  "startIndex" : 1,
  "Resources" : [{
    "id" : "47XXXXXXXXXXXXXXXXXXXXXXXXXXXX6D",
    "schemas" : [ "urn:scim:schemas:core:2.0:User", "urn:scim:schemas:extension:fa:2.0:faUser" ],
    "userName" : "fa_operator",
    "urn:scim:schemas:extension:fa:2.0:faUser" : {
      "userCategory" : "DEFAULT"
    },
    "active" : true
  }, {
    "id" : "4AXXXXXXXXXXXXXXXXXXXXXXXXXXXX48",
    "schemas" : [ "urn:scim:schemas:core:2.0:User", "urn:scim:schemas:extension:fa:2.0:faUser" ],
    "userName" : "fa_guest",
    "urn:scim:schemas:extension:fa:2.0:faUser" : {
      "userCategory" : "DEFAULT"
    },
    "active" : true
  }, {
    "id" : "51XXXXXXXXXXXXXXXXXXXXXXXXXXXX5A",
    "schemas" : [ "urn:scim:schemas:core:2.0:User", "urn:scim:schemas:extension:fa:2.0:faUser" ],
    "userName" : "cblossom@mailinator.com",
    "urn:scim:schemas:extension:fa:2.0:faUser" : {
      "userCategory" : "DEFAULT",
      "accountType" : "Person",
      "workerInformation" : {
        "personNumber" : "99999",
        "manager" : "null",
        "department" : "null"
      }
    },
    "active" : false
  } ]
}



The JSON parsing looks like this:
 
User-added image



Note that if the personNumber Collector Mapping Parameter is removed, the error does not occur.
 
CauseThis error is caused by parsing a Collector Mapping Parameter that is not part of every array element in the JSON array. In the above example, personNumber is part of workerinformation which is not part of every array element. Removing this parameter, leaves only fields AccountID and isActive which belong to all array elements and do not cause the error. 

This is a known issue reported in engineering ticket ACM-104046.
 
ResolutionThis issue is being investigated by the Engineering team in order to provide a permanent resolution in a future release.
 
WorkaroundEdit the JSON response parameter to include only Collector Mapping Parameters that are part of every array element. In the example above, remove personNumber.
 

Attachments

    Outcomes