Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

ConnectionJSON, Hard coded "admin token" variable?

rp781
New Contributor
New Contributor

Hello, the application I'm working with with uses a single static token for all calls, create user, get user etc.. so no access tokens involved. I want to create a connection json where the other jsons reference the connection jsons hard coded token but with a variable.. I don't want to hard code this static admin token in all of the jsons. Is this a possibility? Thank you

4 REPLIES 4

AmitM
Valued Contributor
Valued Contributor

Hi @rp781 ,

Yeah it should work. You can create a dummy connection JSON

{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "",
"httpMethod": "POST",
"httpParams": {
"username": "",
"password": "ds"
},
"tokenType": "Bearer",
"accessToken": "Your actual token"
}
}
}
 
In your provisioning JSONs or recon wherever you have authorization , user your token instead of variable
"Authorization": "Hard code your token"
 
Thanks,
Amit
If this answered your query consider ACCEPTING AS SOLUTION.

rp781
New Contributor
New Contributor

Hi Amit, 

Thanks for the reply, but it isn't exactly what I'm looking for. I want to have the hard coded token exist ONLY in the connection json. Then the other jsons some how reference it with a variable. It is a security risk to have the hard coded token in all of the jsons. 

NM
Regular Contributor III
Regular Contributor III

Hi @rp781 ,

${access_token} can be used in subsequent call.

Store the static token in 

"accessToken": "Your actual token" (Connection Json)
 
In the subsequent call you can define "Authorization" as header and use ${access_token} to pass the value
 

rp781
New Contributor
New Contributor

I did Bearer ${access_token} and it worked 🙂 thank you.