Search code examples
sap-cloud-sdk

How to use Principal Propagation to call Workflow REST APIs


Is it possible to use Principal Propagation to call Workflow REST APIs using type-safe client? The way provided is via client credentials. Is there any plan to support principal propagation in the future?

https://sap.github.io/cloud-sdk/docs/java/features/rest/clients/scp-workflow-rest-api


Solution

  • Yes, it is possible to use the Principal Propagation Authentication flow to call the Workflow service while using the type-safe workflow client.

    However, you cannot use the ScpCfServiceDestinationLoader to create the destination programmatically in this case. Currently, we only support client credentials flow with the loader.

    Instead, you should create a destination in BTP(CF) with OAuth2UserTokenExchange authentication type and then subsequently use DestinationAccessor to fetch this destination.

    We are evaluating options to extend the ScpCfServiceDestinationLoader API to support other authentication types but have not planned this feature yet.