cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically set the basic authentication for the target

0 Kudos
922

Hi all,

We have to publish some APIs in SAP API Management Cloud whose endpoint will be a some SAP CDC APIs.

The CDC team says that they need us to make the call to their API with different credentials (basic auth) depending on the front-end from which our APIM proxy is invoked.

To meet other requirements, we are going to use tokens, but for this one we have thought to add api key (I understand that there is no problem to apply both).

With the api key, besides controlling that the apis are not invoked from unauthorized applications, we want to dynamically set the credentials that will be used to make the call to the target endpoint. Is this possible?
We don't want to create N apis, one for each possible consumer, we want to have a single api to manage this.

Thanks and kind regards,
Judit

Accepted Solutions (1)

Accepted Solutions (1)

MortenWittrock
Active Contributor

Hi Judit

Yes, you can set the basic authentication header dynamically using the Basic Authentication policy. The Verify API Key policy sets a number of variables (documented here), that you can use to determine the caller and possibly look up the credentials in a Key Value Map using the Key Value Map Operations policy.

Regards,

Morten

Answers (0)