PackagePackagetypeA library you install and call yourself.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 →

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.

Emits audit log events from a CAP Java application to the SAP Audit Log service: personal data access, personal data modification, configuration change and security events, each matched to the Audit Log Event Catalog's semantics. The Maven dependency cds-feature-auditlog-ng runs against a user-provided service instance for SAP Audit Log service bound in the application's Cloud Foundry space; local testing loads the same credentials from a default-env.json file instead. The namespace an event carries defaults to the one in the service binding, and can be overridden per event with the auditlog.namespace payload key, a value that survives outbox serialisation; the service rejects an event naming a namespace that was never registered.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Provides
Audit loggingCAPAudit loggingcapabilityRecording 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.
Flavors
Requires
SAP Audit Log serviceSAP Audit Log serviceartifactNamed as a dependency in its documentation.

Who is behind it

CAPCAPOrganisationMaintains this
In the atlas: maintains 10
@cap-java
maintainerAndreas WehrmannPersonContributes to this
In the atlas: contributes to 1
@andwehrm
BraunMatthiasPersonContributes to this
In the atlas: contributes to 8
@BraunMatthias
Guilherme DellagustinPersonContributes to this
In the atlas: contributes to 27
@dellagustin-sap
georgi-shakevPersonContributes to this
In the atlas: contributes to 1
@georgi-shakev
Miroslav TsvetanovPersonContributes to this
In the atlas: contributes to 2
@mtsvetanov071
Marvin LPersonContributes to this
In the atlas: contributes to 7
@Schmarvinius
simeongelovskiPersonContributes to this
In the atlas: contributes to 2
@simeongelovski
sjvansPersonContributes to this
In the atlas: contributes to 45
@sjvans
8 contributors

What it declares

Every artifact

Type
Package
Origin
By SAP
Runtime
Java

As a package

Where it runs
Inside its host
Distributed through
Maven

Connections3

com.sap.cds:cds-feature-auditlog-ng connectionscom.sap.cds:cds-feature-auditlog-ngPROVIDES→ provides1provides stated Handles the four CAP audit log event types and sends them to the [SAP Audit Log service](artifact:btp-audit-log), matching the Audit Log Event Catalog's semantics so downstream tooling reads standard events. cap-java/cds-feature-auditlog-ng — README: https://raw.githubusercontent.com/cap-java/cds-feature-auditlog-ng/f13e9ed1531b59274a6e1b579c28114cc0a6d304/README.md cap-java/cds-feature-auditlog-ng — README: https://raw.githubusercontent.com/cap-java/cds-feature-auditlog-ng/f13e9ed1531b59274a6e1b579c28114cc0a6d304/README.md com.sap.cds:cds-feature-auditlog-ng — POM: https://repo1.maven.org/maven2/com/sap/cds/cds-feature-auditlog-ng/0.1.1/cds-feature-auditlog-ng-0.1.1.pomAudit loggingNEEDS→ connects to1connects to stated Emitting the audit log events of a CAP Java application to the SAP Audit Log service, in the shape of its Audit Log Event Catalog. cds-feature-auditlog-ng — README: https://raw.githubusercontent.com/cap-java/cds-feature-auditlog-ng/f13e9ed1531b59274a6e1b579c28114cc0a6d304/README.md cap-java/cds-feature-auditlog-ng — README, About this project: https://raw.githubusercontent.com/cap-java/cds-feature-auditlog-ng/f13e9ed1531b59274a6e1b579c28114cc0a6d304/README.mdSAP Audit Log service→ needs1needs stated cap-java/cds-feature-auditlog-ng — README: https://raw.githubusercontent.com/cap-java/cds-feature-auditlog-ng/f13e9ed1531b59274a6e1b579c28114cc0a6d304/README.mdSAP Audit Log service

Where it sits in your app

Download
Your CAP applicationYour SAP BTP subaccountcds-feature-auditlog-ng — README, checked 2026-09-19: “The CDS plugin for SAP Audit Log service enables Java CAP applications to emit audit log events in a standardized way.”outboundcom.sap.cds:cds-feature-auditlog-ng, modulecom.sap.cds:cds-feat…SAP Audit Log service, service instanceSAP Audit Logservice
SAPnot SAP's, or the project's ownstated in the document

README

quoted from cap-java/cds-feature-auditlog-ng under Apache-2.0, read
cap-java/cds-feature-auditlog-ng/README.mdOn GitHub

REUSE status

CDS plugin for SAP Audit Log service

About this project

The CDS plugin for SAP Audit Log service enables Java CAP applications to emit audit log events in a standardized way. It is fully compatible with the Audit Log Event Catalog, ensuring standardized event semantics and compatibility.

You can emit the following types of audit log events:

  • Personal Data Access Event
  • Personal Data Modification Event
  • Configuration Change Event
  • Security Event

Official CAP documentation can be found here.

Testing

For both local and cloud testing, refer to the cloud-cap-samples-java repository and follow the instructions provided in its README.

For local testing, make sure to create a default-env.json file at the root of your project. This file should contain the following content:

{
  "VCAP_SERVICES": {
    "application-logs": [
      {
        "binding_guid": "binding_guid",
        "binding_name": null,
        "credentials": {},
        "instance_guid": "instance_guid",
        "instance_name": "cf-logging",
        "label": "application-logs",
        "name": "cf-logging",
        "plan": "lite",
        "provider": null,
        "syslog_drain_url": null,
        "tags": [],
        "volume_mounts": []
      }
    ],
    "user-provided": [
      {
        "binding_guid": "binding_guid",
        "binding_name": null,
        "credentials": {
          "url": "als-endpoint",
          "region": "als-region",
          "namespace": "registered namespace",
          "cert": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----",
          "key": "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----",
          "passphrase": "private key pass phrase"
        },
        "instance_guid": "instance_guid",
        "instance_name": "auditlog-ng",
        "label": "user-provided",
        "name": "auditlog-ng",
        "syslog_drain_url": null,
        "tags": [
          "auditlog-ng"
        ],
        "volume_mounts": []
      }
    ]
  },
  "VCAP_APPLICATION": {
    "application_id": "application_id",
    "application_name": "bookshop-srv",
    "application_uris": [
      "application_uris"
    ],
    "cf_api": "cf_api",
    "limits": {
      "fds": 32768
    },
    "name": "bookshop-srv",
    "organization_id": "organization_id",
    "organization_name": "organization_name",
    "space_id": "space_id",
    "space_name": "space_name",
    "uris": [
      "application_uris"
    ],
    "users": null
  }
}

This file simulates the Cloud Foundry environment variables required for your application to run locally.

Requirements and Setup

To get your project running, ensure you have the following prerequisites:

  • Java 17 or higher installed
  • A user-provided service instance for SAP Audit Log service created in your Cloud Foundry space
  • The Maven dependency for cds-feature-auditlog-ng added to your project

Dynamic Namespace Selection (Optional)

By default, the namespace used in audit log events is taken from the service binding credentials. This is sufficient for most applications.

Optional: For applications that need to route audit events to different namespaces, the namespace can be overridden per-event using the payload.

Payload-based Namespace

Set the namespace directly in the event payload using the key auditlog.namespace. This approach survives transactional outbox serialization, ensuring the custom namespace is preserved even when events are processed asynchronously through the outbox.

Important: The key must be exactly "auditlog.namespace". You can also use the constant AuditLogNG.NAMESPACE_ATTRIBUTE.

Examples
// Security Event
SecurityLog securityLog = SecurityLog.create();
securityLog.setAction("login");
securityLog.setData("User logged in");
securityLog.put("auditlog.namespace", "my-custom-namespace");
auditLogService.logSecurity(securityLog);

// Data Access Event
DataAccessLog dataAccessLog = DataAccessLog.create();
dataAccessLog.setAccesses(List.of(access));
dataAccessLog.put("auditlog.namespace", "my-custom-namespace");
auditLogService.logDataAccess(dataAccessLog);

// Config Change Event
ConfigChangeLog configChangeLog = ConfigChangeLog.create();
configChangeLog.setConfigurations(List.of(configChange));
configChangeLog.put("auditlog.namespace", "my-custom-namespace");
auditLogService.logConfigChange(configChangeLog);

// Data Modification Event
DataModificationLog dataModificationLog = DataModificationLog.create();
dataModificationLog.setModifications(List.of(modification));
dataModificationLog.put("auditlog.namespace", "my-custom-namespace");
auditLogService.logDataModification(dataModificationLog);
Resolution Priority

The namespace is resolved in the following order:

  1. Payload: payload.get("auditlog.namespace")
  2. Service binding: Namespace from the service binding credentials
Behavior
ScenarioNamespace Used
auditlog.namespace set in payloadCustom namespace from payload
Namespace is empty or whitespace-onlyFalls back to service binding
No custom namespace setNamespace from service binding

Note: The custom namespace value is trimmed of leading/trailing whitespace before use.

Error Handling

If you specify a custom namespace that is not registered in the SAP Audit Log service, the service will reject the event with a 403 Forbidden error. Ensure all custom namespaces are properly registered before use.

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 at 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 2025 SAP SE or an SAP affiliate company and cds-feature-auditlog-ng 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.0.4

Features 1

Notes
Added
  • Support for dynamic namespace selection via event payload (AuditLogNG.NAMESPACE_ATTRIBUTE)
  1. v0.0.3

    Features 1

    Notes
    Added
    • Auto-populate userInitiatorId from the context
  2. v0.0.2

    Features 1

    Notes
    Added
    • Support for sending generic audit log events
  3. v0.0.1

    Features 1

    Notes
    Added
    • Initial release
Audit logging
  1. SAP Audit Log serviceIngests and retains compliance audit data from BTPfrom BTP/BAIP
  2. com.sap.cds:cds-feature-auditlog-v2CAP Java handler for SAP Audit Log service API version 2from CAP
  3. com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versionsfrom CAP
  4. @cap-js/audit-loggingCAP integration with the SAP Audit Log servicefrom CAP
  5. s4hana-hana-audit-policiesSQL templates for HANA audit policies of an S/4HANA tenantfrom BTP/BAIP

Details

Sources3
Added by handdiscovered herechecked
github.com/cap-java/cds-feature-auditlog-ngtree, 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
runtimesjava
discovered viaAdded by hand
first seen in the atlas
ecosystem and domaincap, security-and-compliance
Flavors1
Java
“This artifact is a CAP Java plugin that provides out-of-the box SAP Audit Log NG Service.” — com.sap.cds:cds-feature-auditlog-ng-root — POMchecked
Contributors8
History in the atlas4
  1. The second reader read the connects batch of 2026-09-19 on 2026-09-22, after its acceptance, and found: the for sentence names the Audit Log Event Catalog from a passage the edge did not cite; it is cited now.
  2. Handles the four CAP audit log event types and sends them to the SAP Audit Log service, matching the Audit Log Event Catalog's semantics so downstream tooling reads standard events.
  3. The plugin required the Audit Log service; the connection says which way the events go.
  4. First seen.
For your agent
Ref
artifact:cap-java-cds-feature-auditlog-ng
JSON
/artifacts/cap-java-cds-feature-auditlog-ng.json
MCP
Connecting an agent