Audit & Traceability

Auditing and traceability answer one question: who did what, where, when and how. The person asking might be an engineer debugging a failed transfer, a sysadmin keeping things running, a manager reviewing who accessed what, an auditor checking compliance… Filestash keeps records at the level of detail each of them needs, giving you the accountability and transparency that any governance, risk and compliance strategy is built on.

In this guide, we’ll follow the journey of Mike. Mike needs access to a couple of S3 buckets and to his team’s SharePoint. By the book, anytime Mike needs access to a bucket, he has to request short-lived credentials that expire after a few hours. That means he has to connect to a jump server from his terminal and use a CLI tool like saml2aws or aws sso login. In everyday use though, it’s so painful that what usually happens is someone ends up creating an access_key_id / secret_access_key pair per person, keeping track of which key belongs to whom, asking people not to share them, and hoping not only that they comply but also that nobody dealing with the MFA mandate comes knocking at your door.

With Filestash, things are much simpler: you connect the storages you need, link them to your IdP and build authorisation rules. From there, people can get the Dropbox experience with the web client or the sync client, use the gateway for programmatic access over protocols like SFTP, S3 or AS2, or give their agents a shared folder that syncs. Meanwhile, the audit trail is straightforward, and you stay at the helm with complete control over your data.

Auditing

No matter what Mike does, whether it’s signing in, opening a file or uploading a report, it ends up in the audit log, ready to be searched, sliced and diced:

The data can be exported to various formats, or accessed programmatically via the API.

By default, Filestash ships with an auditing plugin built for simplicity: fast, with no overhead. When compliance requirements mean audit records must be immutable, unalterable, verifiable, continuous, kept for a defined retention period and GDPR-compliant, we have a separate compliance plugin with hash-chained records, RFC 3161 timestamping via eIDAS-qualified commercial timestamping services, heartbeats, automatic integrity checks and everything you need to make auditors happy. This comes at the cost of a slightly more complex setup and lower performance, due to the overhead of timestamping and verification. We also have variants that can run in fully air-gapped environments.

Traces

Where auditing tells you what Mike did, tracing tells you what happened inside a single request. Filestash is instrumented with OpenTelemetry: every request produces a trace, broken down into spans for each operation it goes through. When a transfer fails somewhere along the way, that’s how you find out exactly where and why.

Let’s say Mike tries to move a file and it fails. If you’re lucky, he sends you a screenshot or at least the trace ID shown on the error page:

Error Page showing the traceID

If he doesn’t, you can still find the trace ID in the audit log or in the logs. Each request gets its own unique ID, which is your entry point into everything that happened during that request.

Pulling up that trace ID gives you the full picture. Here, Mike connected through the SFTP gateway and tried to move a file from one of his S3 buckets to the team’s SharePoint, which works across storages thanks to the virtual filesystem:

Example of a trace on zipkin

Each span is one step of the request, containing the full details of everything that hapened so rather than guessing from a vague error message, you can see exactly which step failed and what it was doing at that moment.

How traces are exported depends on the tracing plugin you use. The default one works with Zipkin: it either sends traces straight to it through its API, or writes them to a file you can import later.

Logging

Alongside auditing and traces, Filestash produces traditional logs aimed at the sysadmin running the instance and the engineer debugging it: HTTP request details, performance metrics and other messages, at four levels: DEBUG, INFO, WARNING and ERROR (for production use, we recommend INFO). In practice, they look like this:

2026/11/30 13:38:55 HTTP 200 GET 1175.4ms /api/files/ls?path=%2F trace=c2ec16340368183f224d982200c31fea
2026/11/30 13:39:10 HTTP 200 GET 7903.0ms /api/files/cat?path=%2FIMG_9955.jpeg&thumbnail=true trace=a41eb5163981d9d942d74feb0620c025
2026/11/30 13:39:10 HTTP 200 GET 8175.7ms /api/files/cat?path=%2FIMG_9957.jpeg&thumbnail=true trace=d97c41deeddcee37a96db9a46b8f2cf2
2026/11/30 13:39:12 HTTP 200 GET 10600.7ms /api/files/cat?path=%2FIMG_9956.jpeg&thumbnail=true trace=e5bc88b23317d76c7cb88f6a0373da00
2026/11/30 13:39:13 HTTP 200 GET 11058.2ms /api/files/cat?path=%2Fimage.jpg&thumbnail=true trace=49733955e92da9b9b699f1116d0fc574
2026/11/30 13:39:13 HTTP 200 GET 11093.9ms /api/files/cat?path=%2FIMG_9954.jpeg&thumbnail=true trace=0d32000bf407808b4f1d76181af7afcf
2026/11/30 13:39:14 HTTP 200 GET 4552.7ms /api/files/cat?path=%2FIMG_9958.jpeg&thumbnail=true trace=7ae1174d8f489395cf2d13fb1be95e84
2026/11/30 13:39:17 HTTP 200 GET 6644.3ms /api/files/cat?path=%2FIMG_9959.jpeg&thumbnail=true trace=3ab33107c33bd9979074c79cc4488463
2026/11/30 13:39:18 HTTP 200 GET 5582.4ms /api/files/cat?path=%2FIMG_9960.jpeg&thumbnail=true trace=9642bd2717e73f9af9fe32bbfa566728
2026/11/30 13:39:19 HTTP 200 GET 6294.3ms /api/files/cat?path=%2FIMG_9963.jpeg&thumbnail=true trace=c52296afe393da9008c990cfbce667f8
2026/11/30 13:39:21 HTTP 200 GET 8540.3ms /api/files/cat?path=%2FIMG_9962.jpeg&thumbnail=true trace=a3111f293d99e7339a18a781b66bc898
2026/11/30 13:39:22 HTTP 200 GET 7161.5ms /api/files/cat?path=%2FIMG_9961.jpeg&thumbnail=true trace=f66a5cf741f3c0bc0a7a57389c13cd8f

By default, logs go to both stdout and state/log/access.log. Since log rotation is still a debated topic, you can either use your tool of choice (typically logrotate) or let a Filestash plugin handle it. Finally, it goes without saying that production logs never show personal information or sensitive data (like a password).

General Architecture

Journaling

The journal is the heart of the architecture for everything covered in this guide: every event happening in Filestash goes through it. Plugins ask the journal for what they are interested in, and they receive only those events. We store 2 main kinds of events in the journal: file events and session events (for completeness, there’s a third type, but it’s outside the scope of this guide).

Plugins

You might have noticed a common theme that spread in a lot more than this guide: how auditing, traces and logs are handled depends on the plugin you use. That follows our philosophy that “anything that’s not a fundamental truth of the universe lives in a plugin”. The defaults cover common needs, but you can swap them for plugins with different opinions, or send everything to your SIEM instead.

The auditing plugins are simply journal subscribers: they ask for file and session events and store them in their own opinionated way. That’s what makes the approach flexible: the default setup works for most people, but nothing stops you from going further and changing those opinions.