Audit Logging

Audit logging records relevant actions performed in Cadenza, including the acting user, the action and whether the action succeeded or failed. The events are written asynchronously as structured Log4j messages and can be directed to a dedicated log sink (e.g. log file or database table).

Requirements and Configuration

To use audit logging:

  • Audit Logging feature must be enabled.

  • In the Log4j configuration, the Log4j logger cadenza.audit must be configured with level INFO and an explicit appender. Set additivity to false to keep audit events out of the main application log.

  • A valid auditlogging Configuration must exist and have active set to true.

The following audit logging configuration enables audit logging with default queue settings:

  • XML

  • YAML

  • Environment Variables

auditlogging-config.xml configuration file
<?xml version="1.0" encoding="UTF-8"?>
<auditLoggingConfiguration>
  <active>true</active>
</auditLoggingConfiguration>
myConfig.yaml
cadenzaconfig:
  settings:
    auditlogging:
      active: true
cadenzaconfig_settings_auditlogging_active=true

The complete configuration reference, including the queue settings and their defaults, is available in auditlogging Configuration.

Configuring Log4j

Audit events are handled via a Log4j MapMessage. Use a structured layout, such as JsonTemplateLayout, so that fields remain available for analysis. The following example shows the relevant parts of a Log4j XML configuration:

<Appender type="RollingFile"
    name="auditAppender"
    fileName="logs/audit.log"
    filePattern="logs/audit.%i.log">
  <OnStartupTriggeringPolicy/>
  <DefaultRolloverStrategy max="5"/>
  <Layout
      type="JsonTemplateLayout"
      eventTemplateUri="classpath:audit/logging/Log4j2-AuditLoggingJsonLayout.json"
      stackTraceEnabled="false"/>
</Appender>

<Logger name="cadenza.audit" level="info" additivity="false">
  <AppenderRef ref="auditAppender"/>
</Logger>

Integrate these elements into the main Log4j configuration in a production environment.

Defining a JSON Template Layout

As audit messages are map-based, the expectation is that a JSON template layout is the best fit to preserve the structure for log analysis. In the example, we use a layout distributed with Cadenza that translates the log message keys slightly. However, it is also possible to define your own message layout in a similar file, or to define it inline in the layout definition using <EventTemplateAdditionalField …/> elements completely.

Click to see the example JSON template contents
audit/logging/Log4j2-AuditLoggingJsonLayout.json
{
  "requestId": {
    "$resolver": "map",
    "key": "requestId"
  },
  "timestamp": {
    "$resolver": "map",
    "key": "timestamp"
  },
  "user": {
    "userId": {
      "$resolver": "map",
      "key": "userId"
    },
    "username": {
      "$resolver": "map",
      "key": "username"
    },
    "groups": {
      "$resolver": "map",
      "key": "groups"
    }
  },
  "auditType": {
    "$resolver": "map",
    "key": "auditType"
  },
  "repositoryId": {
    "$resolver": "map",
    "key": "repositoryId"
  },
  "repositoryDisplayName": {
    "$resolver": "map",
    "key": "repositoryDisplayName"
  },
  "itemId": {
    "$resolver": "map",
    "key": "itemId"
  },
  "itemDisplayName": {
    "$resolver": "map",
    "key": "itemDisplayName"
  },
  "itemType": {
    "$resolver": "map",
    "key": "itemType"
  },
  "actionName": {
    "$resolver": "map",
    "key": "actionName"
  },
  "actionCategory": {
    "$resolver": "map",
    "key": "actionCategory"
  },
  "action": {
    "body": {
      "$resolver": "map",
      "key": "body"
    },
    "dataViewId": {
      "$resolver": "map",
      "key": "dataViewId"
    },
    "jobScheduleId": {
      "$resolver": "map",
      "key": "jobScheduleId"
    },
    "additionalParams": {
      "$resolver": "map",
      "key": "additionalParams"
    }
  },
  "status": {
    "$resolver": "map",
    "key": "status"
  },
  "purposeOfRequest": {
    "$resolver": "map",
    "key": "purposeOfRequest"
  }
}

Audit Event

Example of an Audit Event

Each event is written as a structured object. As an example, the following audit event records the successful viewing of a workbook in Cadenza:

{
  "requestId": "d91ad34b-24c1-453d-b57b-eec416c92ad2",
  "timestamp": "2026-09-30T06:09:49.676352854Z",
  "user": {
    "userId": "Administrator",
    "username": "Achim Administrator",
    "groups": [
      {
        "groupName": "Administrator",
        "groupId": "AMW_Administrator"
      }
    ]
  },
  "auditType": "REPOSITORY_ITEM",
  "repositoryId": "databaserepository",
  "repositoryDisplayName": "databaserepository",
  "itemId": "tHKjr_theIiBAVfCfaN2",
  "itemDisplayName": "WorkbookAuditLoggingIT-Read",
  "itemType": "WORKBOOK",
  "actionName": "READ",
  "action": {
    "additionalParams": {
      "hideWorkbookToolBar": false,
      "worksheetId": "WorksheetId[value=UiuAh29kRSymvL56rfIhlg]",
      "hideMainHeaderAndFooter": false
    }
  },
  "status": "SUCCESS"
}

Possible Audit Event Keys

requestId

The request identifier.

timestamp

The time the event occurred.

userId

The identifier of the user who performed the action.

username

The name of the user who performed the action.

groups

The groups to which the user belongs.

groupId

The identifier of a group to which the user belongs.

groupName

The name of a group to which the user belongs.

repositoryId

The id of the affected repository.

repositoryDisplayName

The display name of the affected repository.

itemId

The id of the affected repository item or affected repository.

itemDisplayName

The display name of the affected repository item or affected repository.

itemType

The type of the affected repository item or affected repository.

status

The status of the audit event.

auditType

The type of the audit event.

actionCategory

The category of the action performed.

actionName

The name of the action performed.

additionalParams

Additional parameters associated with the action.

body

The body or payload associated with the action.

dataViewId

The identifier of the data view used by a workbook query.

jobScheduleId

The identifier of the job schedule associated with a subscription.

purposeOfRequest

The purpose of the request, including its justifications.

justification1

The first justification for the purpose of the request, if this feature is enabled.

justification2

The second justification for the purpose of the request, if this feature is enabled.

Possible Audit Types

ACCESS_MANAGEMENT

Import and export of access management items.

AUTHENTICATION

User authentication events, such as login and logout.

AUTHORIZATION

Changes to the access settings of repositories or repository items.

CROSS_REPOSITORY_ITEM

Actions performed on cross-repository items, e.g. cross-repository data sources.

EMBEDDING_TARGET

API calls for an embedding target id.

GROUP

Actions on groups, including their creation, modification and deletion.

GROUP_VARIABLE

Actions on group variables, including their creation, modification and deletion.

REPOSITORY_ITEM

Actions performed on repository items or repositories, including their creation, modification and deletion and accessing them.

SELF_SERVICE

Actions performed by self-service features on repository content.

SUBSCRIPTION

Actions on workbook subscriptions and their interim states.

SYSTEM_SETTING

Import and export of system settings.

USER_ROLE

Actions on user roles, including changes to their names, descriptions and system privileges.

WORKBOOK_QUERY

Queries executed against workbook data.

Possible Audit Categories

DATA

Actions related to data that is exported or being added to Cadenza.

DATA_PROTECTION_CONTEXT

Actions related to data protection contexts.

DRILL_THROUGH

Actions related to drill-throughs.

ENRICHMENT

Actions related to enrichments of objecttypes.

EXTENSION

Actions related to extensions of base links.

FUNCTION_ATTRIBUTE

Actions related to function attributes.

INTERIM_STATE

Actions related to interim states which are automatically generated when technically required for report generations or subscriptions.

JOIN

Actions related to joins between objecttypes.

PERSONAL_INTERIM_STATE

Actions related to personal interim states.

POST_MESSAGE_ACTION

Actions related to postMessage actions.

PROJECT_VARIABLE

Actions related to project variables.

RECORD

Actions related to data records during data acquisitions.

USER_ROLE

Actions related to user roles.

USER_SPECIFIC_RESTRICTION

Actions related to user-specific restrictions.

VARIABLE_VALUE

Actions related to values of group variables.

VERSION

Actions related to versions of workbooks.

Possible Audit Actions

Base Audit Actions

CREATE

Creating an audit-relevant entity.

READ

Accessing an audit-relevant entity or its data.

UPDATE

Modifying an audit-relevant entity.

DELETE

Deleting an audit-relevant entity.

Further Audit Actions

ACTIVE_TO_DELETED

Moving an entity from the active status to the deleted status.

APPEND

Adding data to an existing entity.

AREA_INTERSECTION

Performing an area intersection operation.

CONFIRM_DELETION

Confirming the deletion of a data protection context.

CREATE_ACQUISITION_LAYER

Creating an acquisition layer.

DELETE_PERSONAL_AUTHORIZATION

Declining a personal authorization granted for a repository or a repository item.

EXPORT

Exporting.

EXPORT_AD_HOC_REPORT

Exporting an ad hoc report.

EXPORT_CURATED_REPORT

Exporting a curated report.

EXPORT_CURATED_REPORT_PREVIEW

Exporting a curated report within the Report Designer (without saving the workbook).

EXPORT_IMAGE

Exporting a map image.

EXPORT_JASPER_REPORT

Exporting a JasperReports report.

EXPORT_FEATURE_INFORMATION

Exporting feature information.

IMPORT

Importing repository content, data or configuration.

LOGIN

Logging a user in.

LOGOUT

Logging a user out.

MIGRATE

Migrating repository data sources to cross-repository data sources.

POSTPONE_DELETION

Postponing the deletion time of a data protection context.

REPLACE

Replacing existing repository content, data or configuration.

SAVE

Saving changes to an audit-relevant entity.

SYNCHRONIZE

Synchronizing data sources (create/update/delete objecttyes/joins from database tables).

TEST

Testing a function formula.

TRANSFER_TO_REPOSITORY

Transferring an entity to a repository.

UPDATE_DESCRIPTION

Updating the description of an entity.

UPDATE_PARENT

Updating a group’s parent.

UPDATE_DISPLAY_NAME

Updating the display name of an entity.

UPDATE_PUBLISHING_STATUS

Updating the publishing status of an entity.

Possible Audit Action Statuses

INITIATED

An asynchronous action has been initiated. The following entries show the outcome of the corresponding action(s).

SUCCESS

The action has completed successfully.

FAILURE

The action has failed.