Audit Log

Every state-changing operation is recorded in the audit_logs table with: timestamp, actor (user ID + email), action, bucket, object key, JSON details, and source IP.

s3bear.example.com
Audit log screen
Audit log screen

Recorded actions

ActionTrigger
uploadFile uploaded (simple or multipart)
deleteObject(s) deleted
copyObject copied
moveObject moved
create_bucketNew bucket created
delete_bucketBucket deleted
user_createUser created (local or Entra import)
user_deleteUser deleted
downloadPresigned download URL issued

Optionally, every entry is also written to a flat-file log on disk (configurable, with retention) for tamper-evident archival.

How to use

In the UI: Audit Log in the sidebar. Filter by action / bucket / user / date range; expand a row for the full details JSON.

# API (admin only) — filter + paginate
curl "http://localhost:8200/api/v1/audit?action=delete&bucket=customer-data&page=1&page_size=50" \
  -H "Authorization: Bearer $TOKEN"

Use case: "Who deleted that file?"

A customer reports their onboarding PDF is missing from customer-data. Open the audit log, filter action=delete and bucket=customer-data, and you have the user, timestamp, and IP within seconds.

Use case: compliance evidence package

For ISO 27001 / SOC 2, auditors want to see access logs for sensitive buckets. Export the audit log filtered by bucket pattern as a CSV and attach it to your evidence binder. The flat-file mirror gives you tamper-evident archival storage.

Configuration

Env variableDefaultPurpose
AUDIT_LOG_ENABLEDtrueWrite audit entries to the database
AUDIT_LOG_FILE_ENABLEDtrueAlso mirror entries to a flat file
AUDIT_LOG_RETENTION_DAYS90File audit retention

Related: Webhooks · Configuration