

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Can You Keep a Secret?
incomplete
2: Error Responses
incomplete
3: Minimal Logging
incomplete
4: Obfuscation
incomplete
5: Filtering Logs
incomplete
6: Encrypted Logs
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Three may keep a secret, if two of them are dead.
– Benjamin Franklin
Click to play video
Most applications handle several kinds of secrets:
Most of those are obvious, but less-obvious data also needs careful handling:
But just because information is "private" doesn't mean it's all equally private or should be treated the same way.
The type of sensitive data determines how carefully we handle it. For passwords, best practice is to never store plaintext passwords and to store cryptographic hashes instead. That way, stolen hashes still can't be used directly for login.
It would be ridiculous to apply the same technique to obscuring account numbers, or the fact that you have a database table called project_gondor, which references a new, secret feature you'll be releasing next month.
There's a balance to be struck:
These goals often conflict, so you need judgment about how to handle each type of information. Let's talk about how common security and privacy techniques apply to logging.