Breaches & Data Rights ยท Lesson 1 of 3

Personal data in logs

Study notesAbout 3 minutes. A full lesson with quick checks is on its way.

In short

Logs get copied, kept for months and read by many people, so personal data and secrets in them are a real risk. Log what you need, and no more.

In your work

Fixing a login bug on a client's online shop, you notice the API logs record full requests, including customers' emails and session tokens. That needs raising, not just quietly patching.

What the UK rules say

  • Personal data in logs is still covered by UK GDPR: it needs a purpose, protection and a retention period.
  • If logs expose personal data to people who shouldn't see it, that can be a personal data breach your organisation must assess.
  • OWASP's logging guidance says passwords, session IDs, access tokens and sensitive personal data shouldn't be logged in the clear.

What to do

  1. Raise it through the security or privacy process, so the exposure is assessed.
  2. Mask or remove tokens and personal data where the log is written.
  3. Keep logs for a set time, with access limited to those who need it.

Watch out for

  • Leaving 'temporary' debug logging switched on.
  • Fixing the code but leaving months of exposed logs in place.

In your organisation

What does your organisation's logging standard say about personal data, and how long are logs kept?

Your employer's own policies come first.

Sources

UK law and guidance, explained for learning. Not legal advice.