Skip to main content
Version: Next (unreleased)

Audit Logging

Introduction​

Audit logging records selected administrative and data-management actions in StreamPipes. It provides an operational record of those actions together with the non-sensitive context captured for them. Audit events are written to a dedicated InfluxDB database.

Audit logging is disabled by default. Enable it only after providing a reachable InfluxDB endpoint and credentials for the audit database.

Enable audit logging​

Configure the following environment variables on the StreamPipes backend service, then restart the service. In a Docker Compose deployment, add them to the environment section of the backend service; use the equivalent environment-variable mechanism for Kubernetes or another deployment platform.

environment:
SP_AUDIT_ENABLED: "true"
SP_AUDIT_INFLUX_URL: "http://localhost:8086"
SP_AUDIT_INFLUX_DATABASE: "audit"
SP_AUDIT_INFLUX_TOKEN: "sp-admin"
SP_AUDIT_RETENTION_SCHEDULER_CRON: "0 0 10 * * *"
VariablePurpose
SP_AUDIT_ENABLEDEnables audit logging when set to true.
SP_AUDIT_INFLUX_URLURL of the InfluxDB instance that stores audit events.
SP_AUDIT_INFLUX_DATABASEName of the database used for audit events.
SP_AUDIT_INFLUX_TOKENToken used to authenticate against the audit InfluxDB instance. Treat this value as a secret.
SP_AUDIT_RETENTION_SCHEDULER_CRONSix-field cron expression that schedules the audit-retention job. The example runs it daily at 10:00.

Use an InfluxDB endpoint that is reachable from the backend container or pod. Do not commit a real SP_AUDIT_INFLUX_TOKEN to a Compose file or source repository; provide it through your deployment platform's secret-management mechanism instead.

Recorded information​

Each event records the action. Where an action needs additional context, StreamPipes captures the metadata described below. Sensitive configuration values and credentials are intentionally not included.

Audit eventDescriptionAdditional information tracked
sp.export.downloadExport package downloadedUp to 100 asset IDs, total asset count, overwrite-existing-documents flag, and override-broker-settings flag
sp.import.executeAsset import executedUp to 100 asset IDs, total asset count, overwrite-existing-documents flag, and override-broker-settings flag
sp.export-provider.createExport provider createdProvider type
sp.export-provider.updateExport provider updatedProvider type and names of changed provider fields
sp.export-provider.deleteExport provider deletedProvider type
sp.file.uploadFile upload attemptedFile type
sp.file.deleteFile deletion attempted—
sp.mail.configuration.updateMail configuration updatedNames of changed mail-configuration fields; no configuration values
sp.mail.template.updateMail template updated—
sp.dataset.data.deleteDataset data deleted for a time rangeStart and end timestamps
sp.dataset.data.truncateDataset data truncated—
sp.dataset.dropDataset dropped—
sp.dataset.data.clearAll dataset data cleared—
sp.dataset.retention.configureDataset retention configured—
sp.dataset.retention.removeDataset retention removed—
sp.dataset.retention.runDataset retention job executed—
sp.dashboard.createDashboard created—
sp.dashboard.editDashboard edited—
sp.dashboard.deleteDashboard deleted—
sp.chart.createChart created—
sp.chart.editChart edited—
sp.chart.deleteChart deleted—
sp.asset.createAsset created—
sp.asset.editAsset edited—
sp.asset.deleteAsset deleted—
sp.pipeline.createPipeline creation attempted—
sp.pipeline.startPipeline start attempted—
sp.pipeline.stopPipeline stop attemptedforced
sp.pipeline.editPipeline edit attempted—
sp.adapter.createAdapter created through ConnectStream ID and adapter-creation reason code; no adapter configuration or credentials
sp.adapter.startAdapter start attempted—
sp.adapter.stopAdapter stop attemptedforced
sp.adapter.editAdapter edit attemptedList of recorded changes