Create Service Keys for SAP CPI Cloud Foundry

Create Service Keys for SAP CPI Cloud Foundry

For SAP Integration Suite or CPI Cloud Foundry you have an option to use Service Keys to send messages and access Public API. The Figaf Tool will not test the properties are correct before running tests. 
We need to create keys for both API and for Integration flow

Public API access

To create a service key for public API access follow steps below:
  1. Go to SAP BTP Cockpit and open subaccount for your development
  2. Click on `Instances and Subscription`
  3. Click on `Create`
  4. Select `SAP Process Integration Runtime` service with `api` plan:


  5. On parameters tab add roles AuthGroup_AdministratorAuthGroup_BusinessExpertAuthGroup_IntegrationDeveloper, AccessAllAccessPoliciesArtifacts:

  6. Keep Grant Types as Client Credentials by default:

  7. Click on Create to finalize instance creation.
  8. Once it is created select the item and in the details click on `Create Service Key`:

  9. Define the name of service key, other parameters are default:

  10. Once the service key is created you can take it in JSON format and use in Figaf Tool for integration with Public API:


IFlow Runtime API access

IFlow Runtime API is needed to send messages to CPI system.
To create the service key with IFlow Runtime API access, follow steps:
  1. Go to SAP BTP Cockpit and open subaccount for your development
  2. Click on `Instances and Subscription`
  3. Click on `Create`
  4. Select `SAP Process Integration Runtime` service with `integration-flow` plan:

  5. On parameters tab check that it has ESBMessaging.send role added (it's added by default). If your have other roles to access IFlows, add them as well.

  6. Click on Create to finalize instance creation.
  7. Finally create service key (see steps for Public API) to get the JSON config for IFlow API access configuration in Figaf Tool:

Figaf Tool Agent configuration

New agents

  1. Open Agents page in Figaf Tool
  2. Click on `Create CPI Agent`. Follow configuration steps and put service keys JSON during Public API access configuration and IFlow API access configuration. Then press Parse to fill parameters.



Existing agents

  1. Open agent page in Figaf Tool
  2. Enable `OAUTH` authentication type for public API
  3. Load JSON of created Public API Service Key using the `Parse...` function:
  4. Load JSON of create IFlow Runtime API Service Key using `Parse...` function: