000038768 - Generic REST Collector Test Authentication Token fails with 'Error encountered while fetching token, Status Code: 400' in RSA Identity Governance & Lifecycle

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

Article Content

Article Number000038768
Applies ToRSA Product Set: RSA Identity Governance & Lifecycle
RSA Version/Condition: 7.2.0
 
IssueA test of the Authentication Token of a Generic REST Collector with a valid JsonPath fails with:
 
Error encountered while fetching token, Status Code: 400 

 

User-added image


  The following error is logged to the aveksaServer.log file ($AVEKSA_HOME/wildfly/standalone/log/aveksaServer.log):


04/06/2020 18:34:41.101 INFO  (Thread-155) [com.aveksa.client.component.communication.ChangeListHandler]
Got new change item method=Run ChangeItem[ID=1586212481101, type=PerformQuery, source=null,
source-name=CollectorType:GenericRESTAccountCollector:1:CollectorClass[Account]]
04/06/2020 18:34:41.101 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.client.component.communication.ChangeListHandler] STARTING method=ApplyChanges subTask=Acting on a
changeItem ChangeItem[ID=1586212481101, type=PerformQuery, source=null,
source-name=CollectorType:GenericRESTAccountCollector:1:CollectorClass[Account]]
04/06/2020 18:34:41.101 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.client.component.DefaultComponentManager] DCM132: Ignoring Event:
com.aveksa.client.component.event.PerformQueryEvent[source=com.aveksa.client.component.communication.
DefaultCommunicationManager@67d0b89e]
04/06/2020 18:34:41.102 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.client.datacollector.framework.DataCollectorManager] DCM111:
collector is com.aveksa.client.datacollector.collectors.accountdatacollectors.AccountDataCollector@57fc049f
04/06/2020 18:34:41.103 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.client.datacollector.framework.DataCollectorManager] DCM147: Booted Data Collector -1
04/06/2020 18:34:41.114 DEBUG (ApplyChangesPerformQueryThread-26452)
[com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataReader] Load Generic REST Account Collector properties
04/06/2020 18:34:41.114 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.client.datacollector.framework.DataCollectorManagerFactory] DCMF64: Created DataCollectorManager for collector: -1
04/06/2020 18:34:41.114 DEBUG (ApplyChangesPerformQueryThread-26452)
[com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataReader] Inside perform query
04/06/2020 18:34:41.131 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.common.http.client.RSAHTTPClient] Configure the connection and http request properties
04/06/2020 18:34:41.163 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.common.http.client.RSAHTTPClient] Connection properties configured; proceed to make HTTP call
04/06/2020 18:34:41.213 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.common.http.client.RSAHTTPClient] HTTP connection failed
04/06/2020 18:34:41.215 ERROR (ApplyChangesPerformQueryThread-26452)
[com.aveksa.client.genericrest.authenticationManager.TokenBasedDynamicAuthenticator] Error in parsing the extracted token.
Status code: 400
04/06/2020 18:34:41.216 ERROR (ApplyChangesPerformQueryThread-26452)
[com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataReader] Error in Test Authentication token:
com.aveksa.client.genericrest.GenericRestException: ERROR_PARSING_TOKEN 400

        at com.aveksa.client.genericrest.GenericRestException.parsingError(GenericRestException.java:100)
        at com.aveksa.client.genericrest.authenticationManager.TokenBasedDynamicAuthenticator.
extractToken(TokenBasedDynamicAuthenticator.java:82)
        at com.aveksa.client.genericrest.authenticationManager.TokenBasedDynamicAuthenticator.
fetchToken(TokenBasedDynamicAuthenticator.java:64)
        at com.aveksa.client.genericrest.authenticationManager.AuthenticationManager.
fetchToken(AuthenticationManager.java:44)
        at com.aveksa.client.genericrest.GenericRESTClient.executeTestAuthToken(GenericRESTClient.java:96)
        at com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataReader.
testAuthenticationToken(GenericRESTAccountDataReader.java:283)
        at com.aveksa.collector.generic.rest.adc.GenericRESTAccountDataReader.performQuery(GenericRESTAccountDataReader.java:135)
        at com.aveksa.client.datacollector.collectors.accountdatacollectors.
AccountDataCollector.performQuery(AccountDataCollector.java:476)
        at com.aveksa.client.datacollector.framework.DataCollectorManager.performQuery(DataCollectorManager.java:522)
        at com.aveksa.client.component.collector.DefaultCollectorManager.actUpon(DefaultCollectorManager.java:480)
        at com.aveksa.client.component.collector.DefaultCollectorManager.handle(DefaultCollectorManager.java:120)
        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)
04/06/2020 18:34:41.230 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.client.component.fulfillment.AgentFulfillmentHandlerComponent] Handling event:
com.aveksa.client.component.event.PerformQueryEvent[source=com.aveksa.client.component.communication.
DefaultCommunicationManager@67d0b89e]
04/06/2020 18:34:41.231 INFO  (ApplyChangesPerformQueryThread-26452)
[com.aveksa.client.component.fulfillment.AgentFulfillmentHandlerComponent] Ignoring event:
com.aveksa.client.component.event.PerformQueryEvent[source=com.aveksa.client.component.communication.
DefaultCommunicationManager@67d0b89e]

Please refer to RSA Knowledge Base Article 000030327 -- Artifacts to gather in RSA Identity Governance & Lifecycle to find the location of the aveksaServer.log for your specific deployment if you are on a WildFly cluster or a non-WildFly platform. The aveksaServer.log may also be downloaded from the RSA Identity Governance & Lifecycle user interface (Admin > System > Server Nodes tab > under Logs.)
 
CauseThe Generic REST Collector is not properly configured. Endpoints like the one used here, require specific headers to be sent as part of requests. In this specific case, the endpoint is expecting to receive a Content-Type request header with a value of application/json. The Generic Rest Collector's configuration is missing the required Request Header. This causes the endpoint to respond with response code 400 when logins are attempted from the Collector. 
 
ResolutionBefore creating any Generic REST Collector, carefully look at the endpoint APIs to determine the endpoint requirements and configure the Collector as stipulated by the API documentation.

In this example, the solution would be to reconfigure the Request Header being sent by the Collector (Collectors > {Collector type} > {Collector Name} > Edit):

User-added image
 

Attachments

    Outcomes