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 6
- Recommended 1
Required
Write an audit event for every sensitive action
RequiredWrite 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
RequiredStore 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
RequiredKeep audit logs for a stated period, longer than debug logs, then delete them on schedule.
Review access every quarter
RequiredEvery 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.
Remove access within a day of leaving
RequiredDisable every account of a person who leaves within 24 hours of their last day, and rotate any shared secret they knew.
Grant admin rights only for a set time
RequiredGive nobody standing admin rights to production. Grant them on request, with a reason, for at most 8 hours, and log every grant.
Recommended
Keep roles as code
RecommendedDefine which job gets which role in a file in the repository, apply it from there, and change access only through a reviewed pull request.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers compliance playbook: https://agentwranglers.se/playbook/compliance/audit-logs-and-access.