CDS pluginCDS plugintypeInstalls into a CAP project and extends the runtime. CAP loads it through cds.requires or the plugin hook.See every one →What this type is →by SAPby SAPoriginPublished by SAP itself. A visible facet, never an input to a reading — a dormant official plugin reads exactly like a dormant independent one.See every one →

@cap-js/data-privacy

Integration with SAP Data Privacy Integration, driven by the personal-data annotations already on the model — the annotation that marks a field is the one the service acts on.

Facts

Latestv0.6.3ReleasedLast pushLicenceApache-2.0

Where it sits

Lives in
Provides
Data privacyCAPData privacycapabilityDoing what the law requires with personal data — knowing which fields are personal, answering a subject's request about them, and deleting them when the reason for holding them expires.
Flavors
Requires
@sap/cds≥ 9.8@sap/cdsartifactThe peer range, as published.

Who is behind it

SAP Cloud Application Programming ModelSAP Cloud Application Programming ModelOrganisationMaintains this
In the atlas: maintains 34
@cap-js
maintainerGuilherme DellagustinPersonContributes to this
In the atlas: contributes to 27
@dellagustin-sap
Marten SchiwekPersonContributes to this
In the atlas: contributes to 16
@schiwekM
Simon EngelPersonContributes to this
In the atlas: contributes to 14, wrote 4
@SirSimon04
Stefan RudiPersonContributes to this
In the atlas: contributes to 13, wrote 5
@stefanrudi
4 contributors

Before choosing this

Conditions

LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
  • § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
SAP Developer License Agreement 3.2 CAP →

What it declares

Every artifact

Type
CDS plugin
Origin
By SAP

As a CDS plugin

Declared for
>=9.8
Distributed through
does not say

Connections1

Install

npm add @cap-js/data-privacy

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from cap-js/data-privacy under Apache-2.0, read
cap-js/data-privacy/README.mdOn GitHub

REUSE status

CDS plugin for SAP Data Privacy Integration

About this project

The @cap-js/data-privacy plugin provides an out of box integration for CAP based applications with the SAP Data Privacy Integration (DPI) service.

In particular based on @PersonalData and @ILM annotations in the data model, the plugin automatically provides a /dpp/information endpoint and a /dpp/retention endpoint via which the SAP DPI service can request personal data to show it in its Manage Personal Data app and block and delete data based on retention rules defined in SAP DPI.

More information about how to use the plugin, can be found in the Data Privacy guide - Retention and Data Privacy guide - Information.

Requirements and Setup

Using this plugin requires a valid subscription of the SAP Data Privacy Integration (DPI) service.

Test the plugin locally

In tests/bookshop-app/ you can find a sample application that is used to demonstrate how to use the plugin and to run tests against it.

Local Testing

To execute local tests, simply run:

npm run test

For tests, the cds-test Plugin is used to spin up the application. More information about cds-test can be found here.

Support, Feedback, Contributing

This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.

Security / Disclosure

If you find any bug that may be a security problem, please follow our instructions in our security policy on how to report it. Please do not create GitHub issues for security-related doubts or problems.

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

Copyright 2026 SAP SE or an SAP affiliate company and data-privacy contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

Apache-2.0, read

History

Latest

v0.6.3

Fixes 2

Notes
Fixed
  • Fixed gap in evaluation of auditor scopes on HANA, where 'ABCAuditor' would be accepted for the required scope 'Auditor'
  • Fixed an issue where the logic for adding a backlink to the parent entity on a composition caused failures when deleting blocked data
  1. v0.6.2

    Fixes 5

    Notes
    Fixed
    • Fixed an issue where key associations were not correctly handled
    • Fixed an issue with cds add adding redundant xsuaa scope information
    • Fixed an issue that caused a server crash when no db connection was available during HANA role cleanup
    • Fixed an issue where the dppBlockingDate field was not correctly propagated across entities in the project, particularly entities containing a union or joins
    • Fixed an issue where HANA Analytic Privileges were not correctly generated for views with joins or unions
  2. v0.6.1

    Changed 1, Fixes 5

    Notes
    Changed
    • cds add data-privacy now adds the HDI default role with the schema role for accessing DPP views included. Previously it was only generated by cds build.
    Fixed
    • Fixed an issue where entities with joins or unions would crash the data privacy service generation logic
    • Fixed an issue with handling ILM objects which are projections on top of base tables
    • Fixed an issue with handling inline compositions
    • Fixed an issue with resolving backlinks from projections
    • Fixed an issue where key associations were not correctly handled
  3. v0.6.0

    Features 1, Fixes 1

    Notes
    Added
    • Added cds add data-privacy command, which adds the necessary configuration. Currently only works with MTA & XSUAA.
    Fixed
    • Fixed multiple issues regarding MTXs model handling
  4. v0.5.0

    Features 49

    Notes
    Added
    Retention Management (sap.ilm.RetentionService)
    • Provide the sap.ilm.RetentionService as a REST service at /dpp/retention, requiring the DataRetentionManagerUser role, to integrate with the SAP Data Privacy Integration NG (DPI) Retention Management module.
    • Automatically generate the retention service interface from CDS models annotated with @PersonalData.EntitySemantics and related annotations.
    • Support ILM Object discovery via GET /dpp/retention/iLMObjects, returning metadata including object names, reference dates, organizational attributes, conditions, and data subject roles.
    • Support blocking of ILM object instances and their compositions via dataSubjectILMObjectInstanceBlocking, setting dppBlockingDate and destruction dates recursively through the entire composition hierarchy.
    • Support blocking of data subject master data via dataSubjectBlocking, with validation that no active ILM object instances remain.
    • Support destruction (deletion) of ILM object instances via dataSubjectsILMObjectInstancesDestroying when the earliest destruction date has passed.
    • Support destruction of data subjects via dataSubjectsDestroying when the earliest destruction date has passed and no active ILM object instances remain.
    • Support end-of-business checks via dataSubjectEndOfBusiness to determine whether all business for a data subject is concluded.
    • Support end-of-residence evaluation via dataSubjectsEndOfResidence and dataSubjectsEndOfResidenceConfirmation to identify data subjects eligible for blocking based on retention sets and residence periods.
    • Support retrieval of latest retention start dates via dataSubjectLatestRetentionStartDates per retention set, including condition-based filtering.
    • Support retrieval of organizational attribute values for a data subject via dataSubjectOrganizationAttributeValues.
    • Support retrieval of data subject display information (name and email) via dataSubjectInformation, derived from @Communication.Contact annotations.
    • Support async callback handling for blocking status updates via dataSubjectBlockingAsyncCallback.
    • Support @ILM.ObjectName to customize the ILM object name exposed to the DPI service. The default remains the entity name.
    • Support i18n in DPI UIs
    Organizational Attributes & Value Help
    • Automatically generate value help endpoints for organizational attributes annotated with @PersonalData.FieldSemantics: 'DataControllerID' or @ILM.FieldSemantics: 'LineOrganizationID'.
    • Support three resolution strategies for organizational attribute value help: @Common.ValueList annotation, association target with @Common.Text or @UI.HeaderInfo.Title.Value, or SELECT DISTINCT fallback.
    • Automatically generate value help endpoints for condition fields annotated with @PersonalData.FieldSemantics: 'PurposeID' or @ILM.FieldSemantics: 'ProcessOrganizationID'.
    Blocking & Destruction Aspects
    • Automatically inject sap.ilm.blocking (with dppBlockingDate) and sap.ilm.destruction (with ilmEarliestDestructionDate, ilmLatestDestructionDate) aspects into ILM Objects, Data Subjects, and their composed entities.
    • Support brownfield scenarios where existing fields are annotated with @PersonalData.FieldSemantics: 'BlockingDate' or @PersonalData.FieldSemantics: 'EndOfRetentionDate', skipping injection of the respective aspect fields.
    Access Restrictions for Blocked Data
    • Restrict access to blocked data at the application layer (default) by injecting WHERE clauses into all CQN queries against ILM-relevant base entities, filtering out records where blockingDate is set and in the past.
    • Skip application-layer restrictions for privileged CAP users (_is_privileged), allowing internal service-to-service calls to access all data.
    • Support tableRestrictions: "db" configuration to strip HDI user schema SELECT privileges on ILM-relevant tables, enforcing restrictions at the database level.
    • Generate HANA Cloud Analytic Privileges (.hdbanalyticprivilege) for each view over ILM-relevant tables, restricting access based on the dppBlockingDate column.
    • Generate sap.ilm.RestrictBlockedDataAccess HANA role collecting all view-level analytic privileges and assigned to the default_access_role.
    • Generate sap.ilm.DPPNoRestrictions HANA role granting unrestricted access to all views for support scenarios.
    • Annotate HANA views with @sql.append: 'WITH STRUCTURED PRIVILEGE CHECK' for analytic privilege enforcement.
    • Set and clear SESSION_CONTEXT('ROLES') around database requests on HANA to enable role-based analytic privilege evaluation.
    Auditor Access
    • Grant auditors access to blocked data by default via the Auditor role (XSUAA scope or Cloud Identity Service group).
    • Support entity-level auditor scope override via @Auditing.AuditorScopes: ['SCOPE_NAME'].
    • Support service-level default auditor scope via @Auditing.DefaultAuditorScopes: ['SCOPE_NAME'], with entity-level annotations taking precedence.
    • Include auditor scope checks in both HANA analytic privileges and application-layer restrictions.
    Dynamic Data Subject Roles
    • Support dynamic data subject role assignment via @PersonalData.DataSubjectRole pointing to an enum property, allowing a single entity to represent multiple data subject roles (e.g., Customer, Employee, Debtor).
    • Validate that dynamic role paths resolve to enum properties and do not traverse to-many associations.
    Dynamic ILM Object Enablement
    • Support @ILM.BlockingEnabled with static boolean values to enable or disable ILM Objects.
    • Support @ILM.BlockingEnabled with CQL expression strings (e.g., '(SELECT isEnabled FROM Configuration)') evaluated at runtime.
    Conditions
    • Support condition fields on ILM Objects annotated with @PersonalData.FieldSemantics: 'PurposeID' or @ILM.FieldSemantics: 'ProcessOrganizationID' to narrow retention policies to subsets of data.
    • Expose conditions in the ILM object discovery response with descriptions, value help endpoints, and i18n keys.
    Information Reporting (sap.dpp.InformationService)
    • Provide the sap.dpp.InformationService as an OData V4 service at /dpp/information, requiring the PersonalDataManagerUser role, to integrate with the SAP DPI Information Reporting module.
    • Automatically expose all entities annotated with @PersonalData.EntitySemantics and their compositions as read-only projections in the Information service.
    • Automatically generate @UI.LineItem annotations for exposed entities, ordering fields by keys, semantic keys, personal data, sensitive data, and remaining fields.
    • Automatically generate @UI.FieldGroup annotations for exposed entities if not already provided.
    Extending Services
    • Allow manual extension of the sap.ilm.RetentionService to expose entities with custom projections, aliases, or computed fields from associations (e.g., exposing a DataControllerID from a navigation path).
    • Allow manual extension of the sap.dpp.InformationService for customized entity exposure.
    • Detect already-exposed entities and skip automatic exposure for them.
    Multi-Tenancy
    • Register DPI service instances as SaaS dependencies via cds.xt.SaasProvisioningService or cds.xt.SmsProvisioningService for tenant subscription flows.
    Miscellaneous
    • applicationName configurable via cds.env.requires['sap.ilm.RetentionService'].applicationName. By default using the name from package.json.
    • Leverage CAP's built-in audit logging for all queries performed by the Retention Manager against the database.
    • tableRestrictions configurable via cds.env.requires['sap.ilm.RetentionService'].tableRestrictions with "srv" (default) or "db" options.
540downloads per week, npm
Weekly downloads for @cap-js/data-privacy26 complete calendar weeks from 2026-04-27 to 2026-10-25; the latest total is 540.27 Apr – 3 May: 304 May – 10 May: 82311 May – 17 May: 47818 May – 24 May: 73225 May – 31 May: 7071 Jun – 7 Jun: 2418 Jun – 14 Jun: 94415 Jun – 21 Jun: 2,10422 Jun – 28 Jun: 1,64229 Jun – 5 Jul: 1,0856 Jul – 12 Jul: 1,24613 Jul – 19 Jul: 1,15720 Jul – 26 Jul: 1,53827 Jul – 2 Aug: 2,6113 Aug – 9 Aug: 2,15910 Aug – 16 Aug: 1,23617 Aug – 23 Aug: 2,62724 Aug – 30 Aug: 2,24631 Aug – 6 Sept: 2,3627 Sept – 13 Sept: 2,58214 Sept – 20 Sept: 3,27021 Sept – 27 Sept: 1,76728 Sept – 4 Oct: 1,8915 Oct – 11 Oct: 1,93112 Oct – 18 Oct: 1,57019 Oct – 25 Oct: 540
Data privacy
  1. @sap/cdsCAP Node.js runtime

Details

Sources5
npm registrydiscovered herechecked
The discovery passdiscovered herechecked
npm registry, @cap-js/data-privacyversion, releases, installschecked
github.com/git+https://github.com/cap-js/data-privacy.gittree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
declared for>=9.8
latestv0.6.3
first release
releases and cadence5, ~35d median
discovered vianpm registry, The discovery pass
first seen in the atlas
ecosystem and domaincap, security-and-compliance
Flavors1
Node.js
“For tests, the `cds-test` Plugin is used to spin up the application. More information about `cds-test` can be found [here](https://cap.cloud.sap/docs/node.js/cds-test).” — cap-js/data-privacy — READMEchecked
Contributors4

From the repository’s contributor list, .

History in the atlas2
  1. Integration with SAP Data Privacy Integration, driven by the personal-data annotations already on the model — the annotation that marks a field is the one the service acts on.
  2. First seen.
For your agent
Ref
artifact:cap-js-data-privacy
JSON
/artifacts/cap-js-data-privacy.json
MCP
Connecting an agent