Lion Cipher Lab

Check logrotate settings against a log retention requirement

Why it matters

Requirements often say how long logs must be kept. PCI DSS 10.5.1 says 'retain audit log history for at least 12 months, with at least the most recent three months immediately available', and NIST SP 800-92 treats retention periods as a basic part of log management policy. On Linux, how long logs are actually kept is usually decided by a logrotate setting someone chose to stop the disk filling, not to meet a requirement. The two rarely match. 'weekly' with 'rotate 52' looks like a year but is 364 days. 'rotate 400' looks generous, but a 'maxage 90' further down cuts it to 90 days. A…

What you'll learn

Steps in this lab

  1. Rotation is not retention: compute the retention
  2. The config and the requirements
  3. Write the retention checker
  4. Run it: five of seven fall short
  5. Retention also needs disk, integrity and a copy elsewhere

Open the full interactive lab →