Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/26/2024 01:46 AM - edited 07/26/2024 01:48 AM
Hello,
I'm working on a REST connector that should call a custom Web Service, receive a bearer access token and then do another API call for ChangePassJSON.
I've configured the WebService with OAuth2, using AuthorizationGrantType.CLIENT_CREDENTIALS and ClientAuthenticationMethod.CLIENT_SECRET_BASIC.
I'm using also Postman to test this workflow (successfully):
I'm using a testConnectionParams inside the ConnectionJSON to understand if everything is fine:
This is how I configured the ConnectionJSON:
{
"authentications":{
"acctAuth":{
"authType":"oauth2",
"url":"http://xx.xxx.xxx.xxx:9001/oauth2/token",
"httpMethod":"POST",
"httpParams": "{
\"grant_type\":\"client_credentials\"
}",
"httpHeaders":{
"Content-Type":"application/x-www-form-urlencoded",
"Authorization":"Basic ckcEKCfemkvsdm"
},
"httpContentType":"application/x-www-form-urlencoded",
"expiryError":"ExpiredAuthenticationToken",
"authError":[
"Unable to authenticate the client",
"Invalid OAuth token Bearer"
],
"retryFailureStatusCode": [
401,
403
],
"errorPath": "",
"maxRefreshTryCount": 5,
"tokenResponsePath":"access_token",
"tokenType":"Bearer",
"testConnectionParams": {
"http":{
"url": "http://xx.xxx.xxx.xxx:9001/api/changepsw",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json"
},
"httpContentType":"application/json",
"httpMethod":"POST",
"httpParams": "{\"username\": \"YYY\",
\"newPassword\": \"KKK\"
}",
"successResponse": [],
"successResponsePath": "",
"errors": [
"Couldn't authenticate you"
],
"errorPath": "error"
}
}
}
}
}
The error that I'm getting when "Save & Test Connection" is the following:
No signature of method: com.saviynt.provisoning.rest.RestUtilService.getDynamicBindString() is applicable for argument types: (java.util.LinkedHashMap, java.util.HashMap) values: [[username:YYY, newPassword:KKK], ...] Possible solutions: getDynamicBindString(java.lang.String, java.util.Map)
Little help on this?
Thank you,
F
Solved! Go to Solution.
07/26/2024 03:08 AM - edited 07/26/2024 03:08 AM
Hi @FabianaS , is change password working fine from postman?
07/26/2024 03:15 AM
yes
07/27/2024 07:57 AM
What are special characters contains in password
07/29/2024 05:09 AM
Just an exclamation point !
07/29/2024 07:51 AM
Can you change to @ and validate
07/30/2024 09:26 AM
still same problem
07/30/2024 08:34 PM
Could you kindly provide a detailed snapshot of the information extracted from the logs, encompassing errors and other pertinent functionality details encountered during the execution of this process? Your assistance in furnishing this information would greatly aid in the analysis and resolution of any issues .
‼️‼️⚠️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.⚠️‼️‼️
08/26/2024 06:50 AM - last edited on 08/26/2024 08:32 AM by Sunil
Hi,
sorry for late reply.
I'm currently using this ConnectionJSON a bit revised:
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "http://serverip:port/oauth2/token" ,
"httpMethod": "POST",
"httpParams": {
"grant_type": "client_credentials"
},
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic <clientIDandclientSecretinBase64>"
},
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"Unable to authenticate the client",
"Invalid OAuth token Bearer"
],
"retryFailureStatusCode": [
401,
403
],
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"testConnectionParams": {
"http": {
"url": "http://serverip:port/api/test",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"successResponse": [],
"successResponsePath": "",
"errors": [
"Couldn't authenticate you"
],
"errorPath": "error"
}
}
}
}
and the error that I'm getting is a timeout 408:
Same call from Postman are working fine. Could it be a connectivity issue between Saviynt and the virtual machine hosting the server?
Thank you
[This message has been edited by moderator to mask sensitive information]
08/26/2024 06:55 AM
08/26/2024 09:40 PM
@FabianaS
Make sure you whitelist all the subnets instead of single IP along with the FQDN with Saviynt, and also check the connectivity from your SC 2.0 Machine to target is also working.