opyeb logscrub

What counts as personal data in a server log

2026-11-29 · 2 min read

One-line answer: an IP address, e-mail, phone number or cookie in a log is personal data whenever it can identify a person, so keep only what the purpose needs for as long as it needs it.

The definition

Korea's Personal Information Protection Act covers information that can identify a living individual. A name is not required: information that can be combined easily with other data to single someone out is included. GDPR Article 4 defines personal data as information relating to an identified or identifiable natural person.

The Court of Justice of the European Union held that a dynamic IP address is personal data when the operator can identify the visitor with additional data (C-582/14). IP addresses, cookies, device identifiers, location and access records are treated as protected data in many jurisdictions.

Purpose and data minimisation

Logging for security and incident response can be a legitimate purpose. It still requires keeping only the fields the purpose needs, for only as long as it needs them. Capturing every request body and header 'just in case' violates minimisation.

An access log needs the path, status, response time and timestamp. If the IP must be kept, keep a pseudonym instead of the address; do not log e-mail addresses and tokens at all, or mask them before they reach disk.

Example retention by purpose
LogPurposeSuggested retention
Access logIncident and performance30 to 90 days
Application errorDebugging14 to 30 days
Auth and auditSecurity investigation6 to 12 months
Payment recordsStatutory retentionAs required by law

Masking versus pseudonymisation

Masking removes or obscures a value. Full redaction ([REDACTED]) leaves nothing to recover and is the safest, but equal values can no longer be compared. Partial masking keeps the shape readable but a short value can be guessed from its ends.

Pseudonymisation replaces a value so that it cannot be attributed without additional information. GDPR still treats pseudonymised data as personal data (Article 4(5)). An HMAC-SHA-256 token can be matched back by whoever holds the key, so key management is the security boundary.

original IP   203.0.113.24
partial       203.0.***.***
pseudonym     ip_3f2a9c1d  (HMAC-SHA-256, equal values give equal tokens)
redacted      [REDACTED]

A practical checklist

Before adding a log line, write down what it is for. Limit who can read logs, and check that every outbound path — ticket, chat, analytics — applies the same masking. When an incident happens, establish what the log contained before deciding who to notify.

If a token was present, revoke and reissue it. If personal data was present, follow internal reporting and consider whether a statutory notification duty applies.

Questions

An IP alone does not name a person, so is it personal data?

It can become identifying when combined with access time, account data or network records, so treating it as protected is the safe choice. European cases decide on identifiability, not on whether a name is present.

Does pseudonymisation remove the legal obligations?

No. Pseudonymised data remains personal data and the key must be protected. Reducing exposure requires minimisation and shorter retention as well.

Sources

Every example here can be pasted into the workbench as it is.

Open the workbench