Audit logs and access
Record who did what in a log nobody can change, and keep it for a set time. Prove every quarter that only the right people have access.
- Required 1
- Recommended 5
Required
Remove access within a day of leaving
CMP-30Disable every account of a person who leaves within 24 hours of their last day, and rotate any shared secret they knew.
Recommended
Write an audit event for every sensitive action
CMP-26Write one audit event for each action on a fixed list, with who, what, which record, when, from where and the result.
Make the audit log impossible to change
CMP-27Store audit events where the app can only add and nobody can edit or delete. Chain each event to the one before with a hash.
Keep audit logs for a set time
CMP-28Keep audit logs for a stated period, longer than debug logs, then delete them on schedule.
Review access every quarter
CMP-29Every quarter, export every account and role from each system with production or customer data. Compare it with the staff list and remove extras within five working days.
Keep roles as code
CMP-32Define which job gets which role in a file in the repository, apply it from there, and change access only through a reviewed pull request.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/compliance/audit-logs-and-access">Agent Wranglers compliance and governance playbook</a>. In code you write, add a comment next to it with the same link.