Defending Your Rails App
summary
Practical recipe for stopping bots, scams and fraud inside a legacy Rails app: use Rack::Attack middleware for throttles (examples: 100 requests/15s for general API, 10 logins/min, 100 invoice creations/20h), annotate requests for Kibana logs, flag accounts as suspicious to slow them further, safe-list internal tokens, and ban IPs from an admin panel without deploy. Tie Stripe webhooks and Stripe Radar risk scores into alerts, send Slack notifications for spikes, and put Cloudflare at the edge for large DDoS protection.
AI-written summary · about
chapters (13)
- 0:00Introduction and speaker intro
- 2:34What is a bad actor
- 7:13Defense layers overview
- 10:25Rails layer protection
- 11:06Rack Attack tool explained
- 14:59Abuse techniques and mitigations
- 15:21General abuse and rate limits
- 18:10Credential stuffing prevention
- 21:00Sign up spam defense
- 23:10Business logic abuse
- 28:31Fraudsters and credit card testing
- 30:21DDoS attack handling
- 31:03Q&A and closing remarks
