Architecture Guide #27 • Clean Core Security

SAP BTP Principal Propagation & OAuth User Token Exchange Architecture Guide

A production security engineering guide on propagating end-user identities from SAP BTP into S/4HANA. Master Cloud Connector X.509 certificates, CERTRULE mapping, and OAuth token exchanges.

Interactive Security Architect: Automatically configure your BTP Destination, generate Cloud Connector certificate rules, and export ABAP Cloud consumer code with our In-Browser Principal Propagation Architect.

1. The Technical Service User Vulnerability

When integrating SAP BTP extensions with S/4HANA, architects frequently take the shortcut of configuring Basic Authentication using a technical service user (e.g. RFC_SERVICE_USER). In enterprise production environments, this represents a severe security and compliance vulnerability:

2. How Principal Propagation Works

Principal Propagation forwards the authentic human identity from the BTP user session into S/4HANA without requiring the user to re-enter credentials:

Integration Path Protocol Backend Validation
BTP to On-Premise / Private Cloud Cloud Connector X.509 Short-Lived Certificate S/4HANA STRUST + CERTRULE mapping
BTP to S/4HANA Cloud (Public) OAuth2SAMLBearerAssertion SAP Cloud Identity Services (IAS) trust
BTP Microservice to Microservice OAuth2UserTokenExchange XSUAA Token Exchange flow

3. Cloud Connector X.509 Certificate Generation

When a BTP application issues an HTTP call via the Destination Service with Authentication = PrincipalPropagation:

  1. The BTP Destination Service sends the user's short-lived JWT to the Cloud Connector over mutual TLS.
  2. The Cloud Connector extracts the user identity claim (e.g. email or username) and mints a short-lived (2-minute) X.509 client certificate signed by its Subaccount CA.
  3. The Cloud Connector opens a reverse-invoke HTTPS tunnel to S/4HANA, presenting the X.509 certificate in the TLS handshake.
  4. S/4HANA validates the certificate signature against STRUST and matches the subject CN to an active SU01 user via CERTRULE.

4. Clean Core ABAP Cloud Consumption

In ABAP Cloud Tier-1, developers never handle certificates or passwords manually. Destination resolution is handled cleanly by the framework:

DATA(lo_dest) = cl_http_destination_provider=>create_by_cloud_destination( 'S4HANA_PROPAGATION_DEST' ).
DATA(lo_client) = cl_web_http_client_manager=>create_by_http_destination( lo_dest ).
DATA(lo_response) = lo_client->execute( if_web_http_client=>get ).

Master Enterprise RAP & Clean Core Architecture

Get the complete 400+ page guide with end-to-end architectures, testing patterns, and migration blueprints:

Unlock Complete Enterprise Suite (80% Off • €9.80) → Also available in Paperback & Kindle on Amazon ($19.99)