ERPClimb logoERPClimb
BTP Security
BTP & Integrationintermediate 4 min read

BTP Security Part 2: Trust, OAuth Clients and Role Collections Across Subaccounts

Preview · a free account unlocks the full lesson

Key takeaway

Configure security consistently in every subaccount: trust to Identity Authentication, xs-security. json with scopes, role templates and role collections delivered by the app, XSUAA service instances as OAuth clients, attribute-based restrictions, and standardized role collection design across dev/test/prod.

In this lessonShow sections

Visual overview

CONFIGURATIONSecuring an app with XSUAAFrom xs-security.json to user access1Define scopes & rolesxs-security.json in the appxs-security2Create XSUAA instanceApp registered as OAuth clientxsuaa3Trust to IASOIDC trust per subaccountTrust4Map collections to groupsSame names in every environmentMappingScopes in tokenApp enforces functionsJWTTip: deliver role collections with the app so all environments match.

Explanation

Part 1 introduced the authorization model; this part covers how it's actually configured across subaccounts. The xs-security.json file defines an application's scopes, attributes, role templates and, optionally, role collections. Creating the XSUAA service instance from that file registers the application as an OAuth client carrying those authorizations. Trust to Identity Authentication, using OIDC, is configured separately at the subaccount level. Giving role collections identical names across every environment makes mapping them to identity-provider groups repeatable rather than something that has to be redone by hand each time.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

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.