We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Personally Identifiable Information

Personally identifiable information (PII) identifies or can be linked to a real person. Names, email addresses, street addresses, and uploaded document names can all qualify.

The thing about PII is that it's useful to attackers even outside your application. It can fuel phishing, identity theft, stalking, account recovery attacks, and social engineering. Unlike a password or API key, a person can't exactly rotate their home address or SSN after a breach.

Prefer Stable IDs

Identifiers like userId, orderId, and uploadedFileId usually provide enough context to investigate an event without copying the customer's email, shipping address, or filename into your logs.

For example, this event keeps its diagnostic value:

{
  "event": "checkout_completed",
  "userId": 42,
  "orderId": 108,
  "totalCents": 2499,
  "shippingAddress": "[REDACTED]"
}

An authorized employee can use the IDs to retrieve the relevant record through a controlled system, but an attacker who steals just the log doesn't get the customer's identity or address.

These IDs are pseudonymous, not truly anonymous. Anyone with access to the application database can probably still connect them back to a person.

Assignment

Bearly Secure already routes shipping details through an intentionally insecure storage transform and writes unnecessary PII to its logs. Encrypt those shipping details and extend the centralized redaction policy.

With Bearly Secure still running, run and submit the CLI tests from the project root.