CPI Security Part 1: Inbound Authentication, Service Keys and Role-Based Access
Free sample lesson · open to everyone
Secure who can call your iFlows: service instances and keys for client credentials, client certificate authentication, user roles checked by the runtime, per-sender credentials and CSRF protection on HTTP endpoints.
In this lessonShow sectionsHide sections
Visual overview
The situation: a real project scenario
A former partner still had access to all iFlows because every sender used the same credential. The team introduced service keys per partner with custom roles per iFlow group, so access could be revoked individually without redistributing credentials to everyone.
Explanation
This series covers security; Part 1 secures inbound calls to Cloud Integration. On BTP, inbound calls to an iFlow endpoint are authenticated using OAuth 2.0 client credentials, client certificates, or basic authentication with service-key credentials. Certificate-based or OAuth methods are the preferred approach over static passwords, since they're easier to rotate and revoke without redistributing a shared secret.
In the BTP subaccount, you create a Process Integration Runtime service instance with the integration-flow plan, and generate a service key for it. That key contains the client ID and secret, or certificate details, that get handed to the sender system so it can authenticate its calls.
Sender adapters have a user-role authorization setting. By default, ESBMessaging.send is required, but custom roles can be defined on the instance and required per iFlow, so a given partner's credentials only ever work for the specific iFlows they're meant to call — not every iFlow in the tenant.
Giving each sender system or partner its own service key, and a custom role where appropriate, means a leaked key or an ended partner relationship can be revoked individually, without affecting any other sender. Tracking key owners and expiry dates is what makes this manageable at scale rather than becoming its own operational burden.
HTTP-based sender adapters can enforce CSRF token handling where a browser or client requires it. Beyond that, the general principle is to only expose the endpoints actually needed, and to consider putting API Management in front of any interface that's genuinely public-facing, for rate limiting, API keys and threat protection beyond what the iFlow's own authentication provides.
How the SAP process fits together
SAP PROCESS EXPLORER · Integration: sender to receiver
ERPClimb.comSecurity Deep Dive — process breakdown
Topic-specific conceptual flow: how key objects and decisions fit together. SAP configurations and exceptional cases can follow different paths.
Selected process stage
Authenticate
Senders use service keys, OAuth or certificates
Representative SAP learning flow, not a guarantee of system runtime sequence in every scenario.
Watch out
Common mistakes
Using one shared credential for every sender system is the most damaging mistake in inbound security design, because it makes it impossible to revoke access for a single partner without breaking everyone else's access at the same time — exactly the situation that forces teams to leave a former partner's access active far longer than intended.
Using basic authentication with personal user accounts, rather than service keys tied to a service instance, ties integration access to an individual's credentials and employment status rather than to a managed, revocable service identity.
Applying the same default role to every iFlow without deliberately scoping access means any sender with valid credentials can call any iFlow in the tenant, not just the ones it's actually meant to use.
Finally, exposing public-facing endpoints with no throttling or additional protection leaves them exposed to the same burst-traffic and abuse risks that API Management's policies exist specifically to prevent.
Do this
Best practices
Issue a separate service key per sender system or partner, so any single key can be revoked individually — if it leaks, or the partner relationship ends — without affecting any other sender's access.
Prefer OAuth client credentials or client certificate authentication over basic authentication with static passwords, since they're easier to rotate and don't depend on a shared secret traveling between systems. Define custom roles per iFlow group rather than relying on the default role for every iFlow, so a partner's credentials only work for the specific iFlows they're meant to call.
Put API Management in front of any genuinely public-facing or partner-facing interface for the rate limiting, API keys and threat protection it adds beyond the iFlow's own inbound authentication.
In the interview
Interview angle
Interviewers ask how senders authenticate to Cloud Integration endpoints on BTP and how you restrict which senders can call which iFlows.
Practice this lesson
Original educational case studies for SAP consultants, not official SAP certification exam questions. Verify product edition and implementation details against the current SAP documentation.
Quick check
0 of 3 questions attempted
Question 1 of 3
Which BTP artifact provides OAuth client credentials for senders calling iFlows?
Question 2 of 3
How can you restrict a partner's credentials to only certain iFlows?
Question 3 of 3
Why give each sender its own credentials?
Practise this in an interview
Answer in your own words and get instant feedback, the way an interviewer would judge it.
1How do you secure inbound access to iFlows in Cloud Integration on BTP?
Was this lesson helpful?
Keep exploring
More lessons in this topic
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.