

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Observability
incomplete
2: Alerts
incomplete
3: Responsible Disclosure
incomplete
4: Incident Severity and Triage
incomplete
5: Damage Control
incomplete
6: Postmortems
incomplete
7: Incident Reporting
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
If you're learning about an attack from your own users (or worse, TechCrunch), you've done something horribly wrong.
Many attacks start with indicators: more failures than normal, odd timings, repeated requests that don't quite look human. Good logs and metrics are how you notice those patterns before too much damage is done.
A useful security log entry includes enough context to reconstruct what happened without exposing sensitive data. It should include things like:
It should exclude or redact:
Good logs and metrics aren't just about uptime and performance. They're a preventive security feature!
A single failed login is no big deal, but 3,821 failed logins from the same IP in a single minute are likely a sign of a brute-force attack:
2024-05-10T09:12:01Z login_attempt outcome=failure userId=null ip=203.0.113.10
2024-05-10T09:12:03Z login_attempt outcome=failure userId=null ip=203.0.113.10
2024-05-10T09:12:05Z login_attempt outcome=failure userId=null ip=203.0.113.10
2024-05-10T09:12:07Z login_attempt outcome=failure userId=null ip=203.0.113.10
Bearly Secure's authentication logs cannot reliably connect an event to the request that caused it. The routes already use a logAuthenticationEvent wrapper in src/routes/auth.ts, but it's a pass-through that adds nothing to the log entry.
Add correlated structured logging to the login and password reset flows.
With Bearly Secure still running, run and submit the CLI tests from the project root.