BlogBlogtypeA post on somebody's own site or a community platform. Nobody edits it after publication, so it dates from the day it was written.See every one →SAP Community

[Part - 1] Enrich CAP based Services with Behaviors using Annotations

Walks through CDS annotations that add behaviour beyond CRUD: @readonly and @insertonly take away write, update or delete on an entity or element, each shown with the OData metadata it generates. @mandatory, @assert.unique, @assert.integrity, @assert.format and @assert.range then enforce input checks that @sap/cds runs on write, with the SQL or HANA constraint @assert.unique compiles to and the error code each rejection returns. It names @restrict and @requires but defers them, calling authorization too large a topic for this post.

Where it sits

Explains
Input validationCAPInput validationcapabilityRejecting bad input before it reaches the database. While this can be done manually inside a handler, there are solutions in place to derive type, range, enum and mandatory checks from the model definitions.AuthorizationCAPAuthorizationcapabilityDeciding 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.
Since then
Input validation changed in @sap/cds 8.5.0, 2024-11-26
Source
reachable

Who is behind it

Ajit Kumar PandaAjit Kumar PandaPersonWrote this
In the atlas: contributes to 1, wrote 3
@AjitKP91
author

Before you read it

ApplicabilityCore changedInput validation changed in @sap/cds 8.5.0, 2024-11-26.

This is a derived prompt to re-check the work, not a claim that the work is wrong. Exact stale statements are recorded separately after editorial review.

Properties

About this work

declared and crawled
Published
declared
Published on
declared
Views
crawled
9,368

For input-validation

on the edge
Applies in
authored
cap

For authorization

on the edge
Applies in
authored
cap

More on this34

Group by34 of 34 pieces
Piece, what it offersStill applies
Also explainingInput validation32
Securing a CAP Node.js App with SAP AMS on BTP Cloud Foundry
SAP Community, Jacky LiuThe reasoningA recipe
nothing recorded
Effective from June 30th 2026 - XSUAA Deprecation of GET Method for OAuth Token Retrieval
SAP Community, Yogananda
nothing recorded
From XSUAA to AMS: Architecting S4HANA CAP Extensions with Policy-Based Authorization
SAP Community, Avinash VaidyaThe reasoningA recipeRunnable code
nothing recorded
How to Restrict CRUD Operations in SAP CAPM Using @Capabilities, @readonly and Test APIs with .http
SAP Community, DeepaRaghoThe reasoningA recipeRunnable code
nothing recorded
Dynamic authorisation with user attributes in SAP CAP and AMS
SAP Community, pedro_iranzoThe reasoningA recipeRunnable code
nothing recorded
Agentic AI on BTP: a Single Agent with LangGraph
SAP Community, Wouter Lemaire
nothing recorded
SAP BTP XSUAA Security Configuration Comparison: Attribute-Based vs. Authority-Based Approaches
SAP Community, rajeshkputumbakaThe reasoningRunnable code
nothing recorded
Declarative Programming in CAP: Less Code, More Value
SAP Community, BirgitSThe reasoning
nothing recorded
Securing CAP Applications with SAP Cloud Identity Services and AMS
SAP Community, gopalanandThe reasoningRunnable code
nothing recorded
Joule Studioがリリースされたので早速CAPアプリを自然言語で操作するカスタムスキルを構築してみた
SAP Community, takayuki_tanaka
nothing recorded
Securing SAP CAP Applications: XSUAA, Roles, and Authorization Best Practices
SAP Community, Soumya-Pirlamarla
nothing recorded
CAP-JAVA implementation for Authorization Management Service (AMS)
SAP Community, Harvey_Yao
nothing recorded
Enabling Authorization Policies in SAP Cloud Identity Services - IAS with AMS/CAP
SAP Community, YoganandaThe reasoningA recipe
Core changed
CAP for nodejs安全的暴露接口练习
SAP Community, ArthurYang
nothing recorded
XSUAA Local Testing
SAP Community, ManasaManuThe reasoningA recipeRunnable code
Core changed
CAPVAL: A project is born
SAP Community, MattBrightman
nothing recorded
Extend SAP Cloud Application Programming Model(CAP) Validations with the CAPVAL Plugin
SAP Community, MattBrightmanThe reasoningRunnable code
nothing recorded
SAP CAP(Cloud Application Programming)开发框架概述
SAP Community, ArthurYang
nothing recorded
XSUAA Based Authentication - Using Managed Approuter
SAP Community, rahul_rajagopalThe reasoningA recipe
Core changed
#CAP-TechBytes Input Validation
SAP Community, ThajunnizaThe reasoning
nothing recorded
SAP Job Scheduling Service + Cloud Application Programming Model application (CAP) + SAP Authorization and Trust Management Service (XSUAA)
SAP Community, former_member412792The reasoning
nothing recorded
Useful CAP CDS and Fiori Commands to Accelerate Development and Deployment
SAP Community, TiaXu
nothing recorded
Qualtrics integration with domain based authorization in CAP project on HANA cloud
SAP Community, former_member69893The reasoningRunnable code
Core changed
An approach to secure multiple integrated SAP CAP java applications with a common XSUAA service instance
SAP Community, sreanik_dhanyakumar2The reasoning
nothing recorded
SAP Business Technology Platform: Authorization and Trust Management Service
SAP Community, SekhuteTK
nothing recorded
How to get authenticated user information with CAP in three different ways – Using the XSUAA API
SAP Community, ale_biagiThe reasoning
nothing recorded
Why developers should care about credential-types for xsuaa?
SAP Community, former_member2839The reasoningA recipeRunnable code
Core changed
Insights of Cloud SDK, CAP, XSUAA, SSH and other BTP topics from 2021
SAP Community, dr_vupThe reasoning
nothing recorded
Understanding security approaches in SAP CAP using XSUAA in node.js flavor and MTA.
SAP Community, balbinosoaresThe reasoningA recipeRunnable code
Core changed
Learn how to define constraints declaratively in your CDS model
SAP Developer Center, SAPThe reasoningA recipe
nothing recorded
Everything new: Try out the latest features in CAP
SAP TechEd — session catalogue, Daniel Hutzel, Daniel SchlachterA recipe
nothing recorded
How SAP secures enterprise AI agents with identity propagation
SAP TechEd — session catalogue, Gunnar KoscheThe reasoning
nothing recorded
#BTP #SAPCAP: Quirky Nuggets (N01-N02)
SAP Community, Ajit Kumar Panda
nothing recorded
SAP CAP function and action with Unstructured/Dynamic Type Input/Output
SAP Community, Ajit Kumar Panda
nothing recorded

Details

Graph5 edges
← POINTS HERE
POINTS OUT →
explainsInput validationcapability, core and community
explainsAuthorizationcapability, core and community
published onSAP Communitypublishing source
discovered viaSAP Communitycap-tag
Source
Type
blog
Published on
Host
community.sap.com
First seen
History2
  • explains → applies_to on capability:input-validation (cap); capability:authorization (cap)Door scope proposed from the title and summary, so a door page lists the piece only where it holds (docs/concepts/content-on-doors.md).
  • Entered the atlasDiscovered via SAP Community · cap-tag.
For your agent
Ref
content:part-1-enrich-cap-based-services-with-behaviors-using-annotations
JSON
/content/part-1-enrich-cap-based-services-with-behaviors-using-annotations.json
MCP
Connecting an agent