Skip to content
All articles
Security27 July 2020·3 min read

The Developer’s Guide to Audit Logs / SIEM

The first time a customer sends a security review, the instinct is to treat it as an obstacle.

Paycux engineering

The first time a customer sends a security review, the instinct is to treat it as an obstacle. It is more useful to treat it as a specification written by someone who has already lived through the failure.

This piece walks through how we think about it at Paycux, what we have changed our minds about, and where the sharp edges are.

What are audit logs and why should you care?

Consider what are audit logs and why should you care?. Evidence is the deliverable. Not the policy document — the artifact that shows the policy was applied on a specific date to a specific system, produced without anyone editing a spreadsheet.

Write down the control before you automate it. A control nobody can describe in a sentence will not survive its first review, no matter how well it is implemented.

Use cases of audit logs

Consider use cases of audit logs. Evidence is the deliverable. Not the policy document — the artifact that shows the policy was applied on a specific date to a specific system, produced without anyone editing a spreadsheet.

Separate the record from the data. Audit events are append-only and describe what happened; user records are mutable and describe who someone is. Keeping the two apart makes retention a job over a timestamp and erasure an operation on a row, instead of a negotiation between them.

  • Keep audit events append-only and separate from user records
  • Describe each control in one sentence before automating it
  • Produce evidence automatically, not by hand
  • Decide retention per data category, in writing

Building audit logs into your app

That brings us to building audit logs into your app. Write down the control before you automate it. A control nobody can describe in a sentence will not survive its first review, no matter how well it is implemented.

Evidence is the deliverable. Not the policy document — the artifact that shows the policy was applied on a specific date to a specific system, produced without anyone editing a spreadsheet.

What kind of events to log

That brings us to what kind of events to log. Evidence is the deliverable. Not the policy document — the artifact that shows the policy was applied on a specific date to a specific system, produced without anyone editing a spreadsheet.

Separate the record from the data. Audit events are append-only and describe what happened; user records are mutable and describe who someone is. Keeping the two apart makes retention a job over a timestamp and erasure an operation on a row, instead of a negotiation between them.

Write down the control before you automate it.

What the payload should be

That brings us to what the payload should be. Write down the control before you automate it. A control nobody can describe in a sentence will not survive its first review, no matter how well it is implemented.

Write down the control before you automate it. A control nobody can describe in a sentence will not survive its first review, no matter how well it is implemented.

How long should you store audit logs?

That brings us to how long should you store audit logs?. Evidence is the deliverable. Not the policy document — the artifact that shows the policy was applied on a specific date to a specific system, produced without anyone editing a spreadsheet.

Separate the record from the data. Audit events are append-only and describe what happened; user records are mutable and describe who someone is. Keeping the two apart makes retention a job over a timestamp and erasure an operation on a row, instead of a negotiation between them.

What frontend to build

What frontend to build deserves its own treatment. Separate the record from the data. Audit events are append-only and describe what happened; user records are mutable and describe who someone is. Keeping the two apart makes retention a job over a timestamp and erasure an operation on a row, instead of a negotiation between them.

Write down the control before you automate it. A control nobody can describe in a sentence will not survive its first review, no matter how well it is implemented.

Where this leaves us

The pattern repeats across every system we have looked at: the hard part is not the mechanism, it is keeping the mechanism honest as the surrounding assumptions change.

If you are working through the same problem and want to compare notes, the docs cover the mechanics and the console shows the behaviour on your own data.

Everything here, already built

Sign-in, enterprise SSO, directory provisioning, roles and an audit trail behind one API. Start with the quickstart and have a working sign-in this afternoon.

Start selling to enterprise customers

Create an account, point sign-in at Paycux, and get back to the part of the product that is actually yours.