WebService source fails when using accesstoken variable in HTTP Operations header

Hi,

In the WebService connector, we set Authentication type to API Token and set the API token in the appropriate field. When adding a HTTP Operation header with key=“x-api-key” and value = “$application.accesstoken$”, the connector fails with a 403 error.

If I paste the literal token into the value field, the connector succeeds.

Am I missing something on the use of the $application.accesstoken$ variable?

Thanks,
David

Hi @dmcconnell_epsilon,

I don’t see any direct issues based on the description you posted.

But here are few things I would try to get better insights on what went wrong,

  1. You can take a look at the VA log and revise the log level to print everything (DEBUG/TRACE) to see if it prints the entire request for further debugging.
  2. Try the curl alternative which practically does the same thing,
curl --location --request POST '<Your_endpoint>' \
--header 'x-api-key: $application.accesstoken$' \
--header 'Content-Type: application/json'

To see if the substitution works in this command.

  1. If you have hold of the network connected to the VA, you can run some simple HTTP/Port listeners. Some thing like,

nc -l -p 8080

This opens a listener and you can point your base URL in the Web Service connector to point at it and trigger the HTTP Operation. The listener would give you a detailed log on what the request from SailPoint looks like.

Key differentiators based on the finding would be,

  1. Is the variable $application.accesstoken$ replaced with an empty string? - IDN is Substituting something but not the API Token.
  2. Is $application.accesstoken$ printed directly in the headers without any substitution? - IDN is not able that its a variable. Something about that header or other headers could have broke it.

Hope this helps.

Hi David,

For me it is working when using custom authentication and adding the value as the private key password. In the header i am using key=“x-api-key” and value=“$application.private_key_password$”

Hope this helps.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.