Audit logging

Recording who touched personal or sensitive data, in a form an auditor accepts, without hand-writing it in every handler. It is often confused with application logging, which records what the code did rather than who accessed what.

Overview

InCAPassessed
SAP SHIPS
Java →

com.sap.cds:cds-feature-auditlog-ng A CAP Java plugin that sends audit log events to the SAP Audit Log service in the format the Audit Log Event Catalog expects.

com.sap.cds:cds-feature-auditlog-v2 The CAP Java handler that sends the SDK's AuditLog events to the SAP Audit Log service over its API version 2, once a service binding is present.

com.sap.cds:cds-services-bom Ships an AuditLogService for personal data access, personal data modification, configuration change and security events, with a default handler that writes them to the application log; a service binding to SAP Audit Log service v2 needs the separate cds-feature-auditlog-v2 module.

Not covered: The automatic part stops at what the model annotates as personal data: configuration changes and security events are defined as event types, and only the application's own code sends them, through audit.log in Node.js or the AuditLogService methods in Java. It writes the trail and does not read it back: production needs a premium-plan instance of the SAP Audit Log service, and retrieval goes through a separate auditlog-management instance or the SAP Audit Log Viewer.

SourceAudit Loggingchecked
THE COMMUNITY ADDS

No community artifact is documented here.

InBTP/BAIPassessed

On BTP the audit trail is a service an application writes to, not a library it links. SAP Audit Log service ingests compliance audit data from BTP services and from the applications running on them, and keeps it ninety days by default.

SAP SHIPS

Present, not yet described.

Not covered: At ingestion and the default ninety days. Reading the trail back, and keeping it longer than that, are separate services — so "the platform records it" does not by itself answer the question an auditor asks.

Core-only here reads the SAP-published entries behind the door: the SAP Audit Log service and s4hana-hana-audit-policies, which defines audit policies for the HANA database tenant under S/4HANA. It is an assessment of the corpus, and what_core_does is left empty: no page has been checked that states an intent here, and the entries carry their own descriptions and links.

THE COMMUNITY ADDS

No community artifact is documented here.

Artifacts6

Group by6 of 6 artifacts
ArtifactSignals
CDS plugins1
@cap-js/audit-loggingCAP integration with the SAP Audit Log service
Signals
none
Packages3
com.sap.cds:cds-feature-auditlog-ngCAP Java plugin sending audit log events to SAP Audit Log service
Signals
none
com.sap.cds:cds-feature-auditlog-v2CAP Java handler for SAP Audit Log service API version 2
Signals
none
com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
Signals
none
Practices1
s4hana-hana-audit-policiesSQL templates for HANA audit policies of an S/4HANA tenant
Signals
none
Services1
SAP Audit Log serviceIngests and retains compliance audit data from BTP
Signals
none

Content13

Group by13 of 13 pieces
Piece, what it offers
CAP: The Road Ahead - Simplicity in an AI Era
YouTube — SAP Developers playlists, SAP Developers, Talk
Named-User Attribution Across BTP Subaccounts: A Two-Hop IAS Token Exchange for Cloud Integration
SAP Community, agnissh, Blog
BTP Audit Log MCP Server: Security Monitoring with AI Assistants
SAP Community, Wouter Lemaire, Blog
Show 10 more
SAP BTP Audit Log Access Just Got Easier - Here’s What’s New
SAP Community, AnisaTuscano, Blog
Implementing Custom Audit Logging in SAP CAP Applications
SAP Community, gopalanand, BlogThe reasoningA recipeRunnable code
Integrating SAP Cloud Identity Services (Identity Authentication - IAS) with SAP Audit Log Viewer
SAP Community, Yogananda, part 2 of 2, Blog
How to enable SAP Audit Log Viewer service to collect all Audit logs from BTP Services - Part 1
SAP Community, Yogananda, part 1 of 2, Blog
How to implement SAP BTP Audit log service in a CAP Application
SAP Community, KrishnaSharma7, BlogThe reasoningA recipe
New majors
Microsoft Sentinel for SAP goes agentless
SAP Community, Martin Pankraz, Blog
Nice patch SAP! Revisiting your SAP BTP security measures after AI Core vulnerability fix
SAP Community, Martin Pankraz, Blog
SAP BTP Audit log Enable and retrieve logs
SAP Community, anikesh_jyotishi2, Blog
Integrate SAP Business Technology Platform audit logs with IBM Security QRadar
SAP Community, TusharTrivedi12, Blog
Introducing the Cloud Application Programming Model (CAP)
SAP Community, Daniel7, Blog
BTP Audit Log MCP Server: Security Monitoring with AI Assistants
SAP Community, Wouter Lemaire, Blog
Integrating SAP Cloud Identity Services (Identity Authentication - IAS) with SAP Audit Log Viewer
SAP Community, Yogananda, part 2 of 2, Blog
How to enable SAP Audit Log Viewer service to collect all Audit logs from BTP Services - Part 1
SAP Community, Yogananda, part 1 of 2, Blog
Show 3 more
Nice patch SAP! Revisiting your SAP BTP security measures after AI Core vulnerability fix
SAP Community, Martin Pankraz, Blog
SAP BTP Audit log Enable and retrieve logs
SAP Community, anikesh_jyotishi2, Blog
Integrate SAP Business Technology Platform audit logs with IBM Security QRadar
SAP Community, TusharTrivedi12, Blog
Implementing Custom Audit Logging in SAP CAP Applications
SAP Community, gopalanand, BlogThe reasoningA recipeRunnable code
How to implement SAP BTP Audit log service in a CAP Application
SAP Community, KrishnaSharma7, BlogThe reasoningA recipe
New majors

Seen working4

ArtifactSignals
Samples4
SAP-samples/btp-secure-developmentOWASP Top 10 workshop exploiting and fixing flaws in a CAP Node.js app
none
teched2022-XP260TechEd 2022 session on SAP BTP security recommendations
none
teched2023-XP185vHands-on applying SAP BTP security recommendations to a trial account
none
teched2025-XP260TechEd 2025 workshop on OWASP Top 10 risks in CAP applications
none

Details

Coverage
statecore only, CAP
assessed
state in BTP/BAIPcore only, assessed
also inBTP/BAIP
SourceAudit Loggingchecked SourceAudit Logging (CAP Java)checked Sourcecap-js/audit-logging — READMEchecked SourceAnnotating Personal Data — capirechecked
For your agent
Ref
capability:audit-logging
JSON
/capabilities/audit-logging.json
MCP
Connecting an agent