Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Basic Authentication REST connector throw null response.

BG_IAM
New Contributor III
New Contributor III

Hello,

I am facing an issue with setting up a REST connection to an application deployed behind a firewall. The ports seem to be open, and the Telnet connection is successful. SSL certificates have been uploaded to the certificate management and attached to the connector. Any idea what might be missing?

Testing connection I'm getting Error Message-null

BG_IAM_1-1722343255819.png

 

Importing I'm getting Error Message-null

BG_IAM_0-1722342988510.png

Connection JSON:

 

 

 

{
    "authentications":{
    "tagetik":{
    "authType":"basic",
    "errorPath":"error.code",
    "maxRefreshTryCount":5,
    "tokenResponsePath":"access_token",
    "properties":{
    "userName":"myusername",
    "password":"mypassword"
    },
    "authError":[
    "InvalidAuthenticationToken",
    "AuthenticationFailed"
    ],
    "retryFailureStatusCode":[],
    "tokenType": "Basic",
    "accessToken": "Basic mytoken",
    "testConnectionParams": {
        "http": {
          "url": "myurl/api/scim/v2/Users",
          "httpHeaders": {
            "Authorization": "Basic my token",
            "httpContentType": "application/json"
          },
          "httpMethod": "GET"
        },
        "successResponse": [200,201],
        "errors": [
          "Couldn't authenticate you"
        ],
        "errorPath": "error"
      }
    }
    }
    }

 

 

 

IMPORT AccEnt JSON

 

 

{
    "accountParams":{
       "connection":"tagetik",
       "processingType":"SequentialAndIterative",
          "statusAndThresholdConfig":{
       "statusColumn":"customproperty5",
       "activeStatus":[
          false
       ],
       "deleteLinks":false,
       "accountThresholdValue":7000,
       "correlateInactiveAccounts":true,
       "inactivateAccountsNotInFile":false
    },
       "doNotChangeIfFailed":true,
       "successResponses":{
          "statusCode":[
             200,
             201,
             202,
             203,
             204,
             205
          ]
       },
       "call":{
          "call1":{
             "callOrder":0,
             "stageNumber":0,
             "http":{
                "url":"https://Myurl/api/scim/v2/Users",
                "httpMethod":"GET",
                "httpHeaders":{
                   "Authorization":"${access_token}",
                   "accept":"*/*"
                },
                "httpContentType":"application/json"
             },
             "listField":"Resources",
             "keyField":"accountID",
             "colsToPropsMap":{
                "accountID":"id~#~char",
                "displayname":"id~#~char",
                "name":"id~#~char",
                "customproperty5":"partiallyBlocked~#~char"
             },
             "disableDeletedAccounts":false
          }
       }
    },
    "entitlementParams":{
       
    },
    "acctEntParams":{
       
    }
 }

 

 

8 REPLIES 8

Raghu
All-Star
All-Star

@BG_IAM  try like below

connection json:

{
  "authentications": {
    "tagetik": {
      "authType": "Basic",
      "errorPath": "error.code",
      "maxRefreshTryCount": 5,
      "tokenResponsePath": "access_token",
      "properties": {
        "userName": "myusername",
        "password": "mypassword"
      },
      "authError": [
        "InvalidAuthenticationToken",
        "AuthenticationFailed"
      ],
      "retryFailureStatusCode": [],
      "tokenType": "Basic",
      "accessToken": "Basic mytoken",
      "testConnectionParams": {
        "http": {
          "url": "myurl/api/scim/v2/Users",
          "httpHeaders": {
            "Authorization": "Basic mytoken",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "successResponse": [200, 201],
        "errors": [
          "Couldn't authenticate you"
        ],
        "errorPath": "error"
      }
    }
  }
}

 

==

import json

{
"accountParams": {
"connection": "tagetik",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty5",
"activeStatus": [false],
"deleteLinks": false,
"accountThresholdValue": 7000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false
},
"doNotChangeIfFailed": true,
"successResponses": {
"statusCode": [200, 201, 202, 203, 204, 205]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://Myurl/api/scim/v2/Users",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"accept": "*/*"
},
"httpContentType": "application/json",
"expiryError": "token_expired",
"authError": ["invalid_token", "unauthorized"],
"retryFailureStatusCode": [401, 403],
"timeOutError": "timeout_error",
"errorPath": "error.message",
"maxRefreshTryCount": 3
},
"listField": "Resources",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"displayname": "id~#~char",
"name": "id~#~char",
"customproperty5": "partiallyBlocked~#~char"
},
"disableDeletedAccounts": false
}
}
},
"entitlementParams": {},
"acctEntParams": {}
}


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star
  • Share logs after clicking save connection
  • Issues url is misisng on connection json

 

{
    "authentications":{
    "tagetik":{
    "authType":"Basic",
    "errorPath":"error.code",
    "url":"URLTOBEADDED"
"maxRefreshTryCount":5,
    "tokenResponsePath":"access_token",
    "properties":{
    "userName":"myusername",
    "password":"mypassword"
    },
    "authError":[
    "InvalidAuthenticationToken",
    "AuthenticationFailed"
    ],
    "retryFailureStatusCode":[],
    "tokenType": "Basic",
    "accessToken": "Basic mytoken",
    "testConnectionParams": {
        "http": {
          "url": "myurl/api/scim/v2/Users",
          "httpHeaders": {
            "Authorization": "Basic my token",
            "httpContentType": "application/json"
          },
          "httpMethod": "GET"
        },
        "successResponse": [200,201],
        "errors": [
          "Couldn't authenticate you"
        ],
        "errorPath": "error"
      }
    }
    }
    }

 

Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]



⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

HI @rushikeshvartak 

Please check from POSTMAN cURL:

curl --location 'https://URL/api/scim/v2/Users' \
--header 'Authorization: Basic TOKEN'

logs after save:

BG_IAM_0-1722440978190.png

 

"2024-07-31T15:49:19.086+00:00","ecm","rest.RestProvisioningService","http-nio-2333333333","DEBUG","Calling Webservice Url - myURL with httpParams - null"
"2024-07-31T15:49:19.086+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","calling executeRequestWithTimeoutConfig for api..."
"2024-07-31T15:49:19.086+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","calling api..."
"2024-07-31T15:49:19.086+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","before calling executeRequestWithHeaders for api..."
"2024-07-31T15:49:19.086+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","isFipsEnabled = false"
"2024-07-31T15:49:19.086+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","getHttpClient - proxyParams : null"
"2024-07-31T15:49:19.087+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","getHttpClient - sslSocketFactory : null"
"2024-07-31T15:49:19.151+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","setting connection timeout to 10 seconds and request timeout to 60 seconds"
"2024-07-31T15:49:19.152+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","getHttpClient - HttpClientBuilder.create().build() called."
"2024-07-31T15:49:19.152+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","called executeGetRequestWithHeaders for api..."
"2024-07-31T15:49:19.153+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","after calling executeRequestWithHeaders for api..."
"2024-07-31T15:49:19.153+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","called api..."
"2024-07-31T15:49:19.153+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","timeout validated for api..."
"2024-07-31T15:49:19.153+00:00","ecm","services.HttpClientUtilityService","http-nio-2333333333","DEBUG","got response for api..."
"2024-07-31T15:49:19.153+00:00","ecm","rest.RestUtilService","http-nio-2333333333","DEBUG","Got showLogs = true"
"2024-07-31T15:49:19.153+00:00","ecm","rest.RestProvisioningService","http-nio-2333333333","DEBUG","Got Webservice API Response: [error:Error URI does not specify a valid host name: myURL]"
"2024-07-31T15:49:19.154+00:00","ecm","rest.RestUtilService","http-nio-2333333333","DEBUG","pullObjectsByRest - responseStatusCode ::null"
"2024-07-31T15:49:19.154+00:00","ecm","rest.RestUtilService","http-nio-2333333333","DEBUG","Got showLogs = true"
"2024-07-31T15:49:19.154+00:00","ecm","rest.RestUtilService","http-nio-2333333333","DEBUG","Got null response statusCode with erroMsg - [error:Error URI does not specify a valid host name: myURL]"
"2024-07-31T15:49:19.154+00:00","ecm","rest.RestProvisioningService","http-nio-2333333333","ERROR","Exception in getting response in pullObjectsByRest :"
"2024-07-31T15:49:19.155+00:00","ecm","rest.RestProvisioningService","http-nio-2333333333","DEBUG","Inside validateErrorResponse"
"2024-07-31T15:49:19.155+00:00","ecm","rest.RestProvisioningService","http-nio-2333333333","DEBUG","Null response from the Target. Target Error Message: [responseText:null, statusCode:null]"
"2024-07-31T15:49:19.155+00:00","ecm","rest.RestProvisioningService","http-nio-2333333333","ERROR","Error while saving the Connection: "
"2024-07-31T15:49:19.155+00:00","ecm","domain.EcmConfigController","http-nio-2333333333","ERROR","ErrorMessage res : [Null response from the Target. Target Error Message: [responseText:null, statusCode:null]]"

 

 

Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]



⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️

 

Error :

tatusCode with erroMsg - [error:Error URI does not specify a valid host name: myURL]"

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak 

The cURL command is the same as the one I shared in my previous post. What else do you expect?

Maybe information that URL is <server name>:<host>

When I try it from SC20, I am getting proper response.

curl --location 'https://URL/api/scim/v2/Users' \
--header 'Authorization: Basic TOKEN'

I saw an error related to an invalid hostname. Do you have any advice? Even after making changes to the JSON, I am still getting the same error message.

BG_IAM
New Contributor III
New Contributor III

It's resolved now, connection established. Instead of hostname I used IP address. 

vamsis
New Contributor
New Contributor

Getting similar error with REST connection, this works fine from postman. 

DEBUG-Got null response statusCode with erroMsg - [error:Error Connection reset]

vamsis_0-1724686811355.png

 

Please raise new thread for your issue with json and logs in text file along with postman screenshot and curl command


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.