The attempts log tracks logins. The audit log tracks privileged actions — the stuff you'd want a record of if anything ever went wrong. Even if you're solo, it's the difference between "I think I did that on Tuesday" and "I know I did that at 14:32 from the laptop".
What to audit
| Action | Why |
|---|---|
| Login success / failure | Already in attempts; mirror the success rows here |
| Session revoked (single) | Who did it, which session |
| Revoke All clicked | The biggest hammer; always log |
| PIN changed | Major security event |
| IP blacklisted / unblocked | Manual policy changes |
| Config changed (max_retry, lockout window) | Drift detection |
| Recovery token used | Last-resort path — always log |
Tamper-evidence (for the paranoid)
If you want defense against "the attacker also edited the audit log to hide their tracks", chain rows by hash: each row stores hash(prev_hash + this_row_payload). Periodically copy the latest hash off-server (Dropbox, S3, even a printed sticky note). If the chain breaks on verification, you know.