📋 Security · Security Fundamentals
Audit Logging
Record security- and business-important actions.
You should be able to answer who did what and when.
Record permission changes and approvals with user and timestamp.
💡 Like a building's sign-in book and camera log: when something goes wrong, you can replay exactly who came through and what they touched.
💡 Why it matters
When something goes wrong, audit logs are how you find out what happened and who was involved. They support investigations, prove compliance, and deter misuse because actions are traceable. Without them, a breach or mistake becomes a guessing game.
🛠️ How to achieve it
⚠️ Signs of trouble
- •No record exists of who changed a permission or approved something.
- •Logs can be edited or wiped by ordinary users.
- •Passwords or tokens show up inside log messages.
- •Logs are kept but never looked at until it is too late.
🎯 Quick check
Score: 0/3Three questions to test the idea.
1. What question should audit logs let you answer?
Answer: Who did what, and when
Audit logs exist to reconstruct important actions, tying each one to a user and a time.
2. What must never appear in audit logs?
Answer: Secrets such as passwords and tokens
Logs should capture the who, what, and when, but never the actual secret values themselves.
3. Why should audit logs be tamper-resistant?
Answer: So someone cannot quietly erase evidence of what they did
If ordinary users can edit or delete entries, the log can no longer be trusted during an investigation.
