Authorization

Deciding who may read or change what, at service, entity and instance level — role checks, forwarded user context, and restrictions evaluated as query filters rather than after the fact.

Overview

SAP SHIPS
Node.js →

@sap/ams-dev Compiles the DCL authorization policies of SAP's Authorization Management Service to DCN, so an AMS-secured application runs and is tested on a laptop.

@sap/ams Decides what a signed-in user may do in a Node.js application that authenticates through SAP Cloud Identity Services, from policies written in DCL.

@sap/cds Evaluates @requires and @restrict from the model at runtime, including instance-based restrictions expressed as where-clauses.

Java →

com.sap.cds:cds-services-bom Evaluates the @requires and @restrict authorization annotations from the CDS model on every request, enforced by CAP's generic service providers without custom code.

Not covered: CAP checks a role and does not assign it: who holds one is set at runtime, in role collections of the SAP Authorization and Trust Management service or, under IAS, in Authorization Management Service policies of Cloud Identity Services. Node.js evaluates the annotations on the target entity of a request only and Java does not check restrictions on composition children, so a rule on an expanded or deeply written child entity is a custom handler.

SourceCAP-level Authorizationchecked
THE COMMUNITY ADDS

cds-entra-id maps Microsoft Entra ID groups and app roles onto CAP roles for an app on Azure App Service, and cap-toolkit wraps role and ownership checks as handler functions.

Artifacts7

7 of 7 artifacts
ArtifactSignals
Build tools1
@sap/ams-devCompiler from AMS DCL policies to DCN for local runs and tests
Signals
Functional boundary
CDS plugins2
@sap/amsAuthorization from DCL policies for Node.js apps on SAP Cloud Identity
Signals
none
cds-entra-idMaps Microsoft Entra ID groups and app roles onto cds.User roles
Signals
Quiet+1
Packages3
@sap/cdsCAP Node.js runtime
Signals
none
cap-toolkitUtility bundle for CAP handlers: builder, roles, validation, queries
Signals
Functional boundary
com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
Signals
none
Services1
SAP Authorization and Trust Management serviceOAuth server issuing JWTs and holding scopes for BTP apps
Signals
none

Content27

Group by27 of 27 pieces
Piece, what it offers
Securing a CAP Node.js App with SAP AMS on BTP Cloud Foundry
SAP Community, Jacky Liu, BlogThe reasoningA recipe
Effective from June 30th 2026 - XSUAA Deprecation of GET Method for OAuth Token Retrieval
SAP Community, Yogananda, Blog
From XSUAA to AMS: Architecting S4HANA CAP Extensions with Policy-Based Authorization
SAP Community, Avinash Vaidya, BlogThe reasoningA recipeRunnable code
Show 24 more
How to Restrict CRUD Operations in SAP CAPM Using @Capabilities, @readonly and Test APIs with .http
SAP Community, DeepaRagho, BlogThe reasoningA recipeRunnable code
Dynamic authorisation with user attributes in SAP CAP and AMS
SAP Community, pedro_iranzo, BlogThe reasoningA recipeRunnable code
Agentic AI on BTP: a Single Agent with LangGraph
SAP Community, Wouter Lemaire, Blog
SAP BTP XSUAA Security Configuration Comparison: Attribute-Based vs. Authority-Based Approaches
SAP Community, rajeshkputumbaka, BlogThe reasoningRunnable code
Securing CAP Applications with SAP Cloud Identity Services and AMS
SAP Community, gopalanand, BlogThe reasoningRunnable code
Joule Studioがリリースされたので早速CAPアプリを自然言語で操作するカスタムスキルを構築してみた
SAP Community, takayuki_tanaka, Blog
Securing SAP CAP Applications: XSUAA, Roles, and Authorization Best Practices
SAP Community, Soumya-Pirlamarla, Blog
CAP-JAVA implementation for Authorization Management Service (AMS)
SAP Community, Harvey_Yao, Blog
Enabling Authorization Policies in SAP Cloud Identity Services - IAS with AMS/CAP
SAP Community, Yogananda, BlogThe reasoningA recipe
Core changed
CAP for nodejs安全的暴露接口练习
SAP Community, ArthurYang, Blog
XSUAA Local Testing
SAP Community, ManasaManu, BlogThe reasoningA recipeRunnable code
Core changed
SAP CAP(Cloud Application Programming)开发框架概述
SAP Community, ArthurYang, Blog
XSUAA Based Authentication - Using Managed Approuter
SAP Community, rahul_rajagopal, BlogThe reasoningA recipe
Core changed
[Part - 1] Enrich CAP based Services with Behaviors using Annotations
SAP Community, Ajit Kumar Panda, Blog
SAP Job Scheduling Service + Cloud Application Programming Model application (CAP) + SAP Authorization and Trust Management Service (XSUAA)
SAP Community, former_member412792, BlogThe reasoning
Useful CAP CDS and Fiori Commands to Accelerate Development and Deployment
SAP Community, TiaXu, Blog
Qualtrics integration with domain based authorization in CAP project on HANA cloud
SAP Community, former_member69893, BlogThe reasoningRunnable code
Core changed
An approach to secure multiple integrated SAP CAP java applications with a common XSUAA service instance
SAP Community, sreanik_dhanyakumar2, BlogThe reasoning
SAP Business Technology Platform: Authorization and Trust Management Service
SAP Community, SekhuteTK, Blog
How to get authenticated user information with CAP in three different ways – Using the XSUAA API
SAP Community, ale_biagi, BlogThe reasoning
Why developers should care about credential-types for xsuaa?
SAP Community, former_member2839, BlogThe reasoningA recipeRunnable code
Core changed
Insights of Cloud SDK, CAP, XSUAA, SSH and other BTP topics from 2021
SAP Community, dr_vup, BlogThe reasoning
Understanding security approaches in SAP CAP using XSUAA in node.js flavor and MTA.
SAP Community, balbinosoares, BlogThe reasoningA recipeRunnable code
Core changed
How SAP secures enterprise AI agents with identity propagation
SAP TechEd — session catalogue, Gunnar Kosche, TalkThe reasoning
Effective from June 30th 2026 - XSUAA Deprecation of GET Method for OAuth Token Retrieval
SAP Community, Yogananda, Blog
SAP Business Technology Platform: Authorization and Trust Management Service
SAP Community, SekhuteTK, Blog

Seen working8

ArtifactSignals
Samples8
auth-samplesCAP services and a UI for trying role restrictions with mock users
No license
bookshop-amsCAP bookshop wired to the Authorization Management Service
No license
btp-user-management-microserviceCAP microservice on XSUAA managing users and authorizations
none
cap-ams-a2aApp-to-app setups between CAP Java and CAP Node.js under AMS and IAS
No license
cap-java-auth-checkCAP Java authorization checks tried case by case
No license
SAP-samples/btp-secure-developmentOWASP Top 10 workshop exploiting and fixing flaws in a CAP Node.js app
none
SAP-samples/e-mobility-driver-appCAP-based PWA for EV drivers proxying SAP E-Mobility OData APIs
none
teched2025-XP260TechEd 2025 workshop on OWASP Top 10 risks in CAP applications
none

Details

What changed — and what it makes stale2
CAP Java 3.7.1, CAP, Java

Instance-based @restrict conditions were pushed into the query on read, but a CREATE or UPDATE was not checked against them beyond ordinary field validation. CAP Java 3.7.1 added a beta check that also validates input data for CREATE and UPDATE events against the same instance-based condition, rejecting a write that would place a record outside the user's allowed instances with HTTP 400.

Makes stale:

Advice that instance-based @restrict only guards reads and that a create or update payload has to be checked by hand for the same rule. That gap is closable now, behind cds.security.authorization.instanceBased.checkInputData — beta, and Java-only as of this release.

@sap/cds-dk 8.6.0, CAP

cds add ams configures a project for authorization through the Authorization Management Service, and runs cds add ias for authentication through SAP Cloud Identity Services with it. Dated from npm.

Makes stale:

Setup guides that wire AMS policies and the IAS binding by hand in a CAP Java project.

SourceIAS Authorization via AMS — capirechecked
Coverage
For your agent
Ref
capability:authorization
JSON
/capabilities/authorization.json
MCP
Connecting an agent