What counts as personal data in a server log
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.
- IP address (IPv4 and IPv6) and access time
- E-mail address, phone number, user or employee id
- Session cookie and authentication token
- E-mail or order number in a query string
- Device and browser combination used as a fingerprint
- Location or search terms that reveal behaviour
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.
| Log | Purpose | Suggested retention |
|---|---|---|
| Access log | Incident and performance | 30 to 90 days |
| Application error | Debugging | 14 to 30 days |
| Auth and audit | Security investigation | 6 to 12 months |
| Payment records | Statutory retention | As 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.
- Purpose, fields and retention written down
- No full request headers or bodies
- IP and user id pseudonymised or masked
- Masking applied before pasting into a ticket or chat
- Access limited and audited
- Automatic deletion after the retention period
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
- Personal Information Protection Act (Korea)
- GDPR Article 4 — definitions
- CJEU C-582/14 — Breyer
- OWASP — Logging Cheat Sheet
Every example here can be pasted into the workbench as it is.
Open the workbench