03/28/2023
08:11 AM
- last edited on
03/28/2023
11:45 AM
by
Dave
Tried following the instructions posted here and ran into multiple issues.
1 - Connection would not save if username/password were provided. Only way to get it to save was to blank out the fields and provide them at a later point
2 - After first saving and then updating the credentials, account import fails with: "Failed url-URL]/ECM/api/v5/user?q=accountExpired:0&fields=username,email,displayname,statuskey&sort=username&order=desc&offset=0&max=500 with Error Message-null"
3 - Connection success status is doubtful as success is returned whether or not the credentials provided are valid
Does the documentation available for 2022.x apply to later versions such as 23.3 ?
Solved! Go to Solution.
03/28/2023 02:25 PM - edited 03/28/2023 02:27 PM
All good, answered those and many other questions. For any unlucky soul who'd ever stumble onto this post:
1 - Don't user the username and password fields. Credentials are to be provided through the CONNECTIONJSON
2 - Issue with account/accesses import was due to authorization missing. Once we figured out the connection bit, it worked a lot better
3 - Connection success is irrelevant in this connector - and most other REST-based connectors unless a "testConnectionParams" entry is present in the CONNECTIONJSON.
Sample:
"testConnectionParams": {
"http": {
"url": "https://hostname/api/users",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept" : "application/json"
},
"httpMethod": "GET"
},
"successReponse": [200]
}
4 - Make sure to name your security system SavforSavREST. Otherwise, a very unfriendly error pops up at provisioning time: "Security system with name SavforSavREST doesn't exists"
So I get to mark my own post as answered. Yay me!
05/30/2023 10:46 PM
@flegare can you please help in sharing the connection json?
I am facing issue and ended up adding username and password. I need to pass the token.
05/31/2023 04:11 AM - edited 05/31/2023 04:12 AM
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"Accept": "application/json"
},
"authError": [
"InvalidAuthenticationToken"
],
"url": "https://SaviyntURL/ECM/api/login",
"httpMethod": "POST",
"httpContentType": "application/json",
"errorPath": "error.code",
"maxRefreshTryCount": 2,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer ABCD",
"httpParams": "{\"username\":\"admin\",\"password\":\"password\"}",
"retryFailureStatusCode": [
401
]
}
}
}
05/31/2023 04:29 AM
Hi @rushikeshvartak the above json asks for Username and Password.
We are working in SSO environment and need a way to avoid this.
05/31/2023 06:11 PM
Hi @Manu269 ,
We are SSO'd for our users as well but still use local credentials for our Sav4SavREST config.
Here is what is used to test the connection:
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://[redacted]/ECM/api/login",
"httpMethod": "POST",
"httpParams": "{\"username\": \"@@USERNAME@@\",\"password\": \"@@PASSWORD@@\"}",
"httpContentType": "application/json",
"httpHeaders": {
"Content-Type": "application/json"
},
"authError": [
"USER_AUTHENTICATION_FAILED",
"PARTNER_AUTHENTICATION_FAILED",
"AuthenticationFailed"
],
"errorPath": "errorCode",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer ${access_token}",
"retryFailureStatusCode": [
401
],
"testConnectionParams": {
"http": {
"url": "https://[redacted]/ECM/api/v5user?q=accountExpired:0&fields=firstname,lastname,username&sort=username&order=desc&offset=0&max=1",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"successReponse": [200]
}
}
}
}