towerops/lib/towerops_web
Graham McIntire 4d73e77f3a
Add 404-based brute force protection system
Implements automated detection and blocking of IPs exhibiting scanning behavior (5+ unique 404s within 1 minute).

Key features:
- Progressive ban escalation (5 min → 1 hour → permanent)
- CIDR range and exact IP whitelisting
- Redis-backed 404 path tracking with 60s TTL
- Cloudflare WAF integration for permanent bans
- Admin UI for whitelist and blocked IP management
- Oban cron jobs for cleanup (expired bans, stale violations)
- ETS caching for whitelist performance

Components:
- Plug: ToweropsWeb.Plugs.BruteForceProtection
- Context: Towerops.Security.BruteForce
- Schemas: IpBlock, IpWhitelist
- Workers: CloudflareBanWorker, ExpiredBanCleanupWorker, StaleViolationCleanupWorker
- Admin UI: /admin/security (superuser only)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 16:31:48 -06:00
..
channels Add backward compatibility for PING results from older agents 2026-02-10 13:18:40 -06:00
components Live-ticking relative timestamps on agents page 2026-02-10 10:24:21 -06:00
controllers Add CI-triggered mass agent update webhook 2026-02-10 13:40:32 -06:00
helpers more tests and fixes 2026-02-07 11:50:18 -06:00
live Add 404-based brute force protection system 2026-02-10 16:31:48 -06:00
plugs Add 404-based brute force protection system 2026-02-10 16:31:48 -06:00
endpoint.ex Add 404-based brute force protection system 2026-02-10 16:31:48 -06:00
gettext.ex init 2025-12-21 11:10:43 -06:00
gettext_helpers.ex feat: migrate email templates to gettext (Phase 2 - Emails) 2026-02-02 09:48:30 -06:00
permissions.ex handle mikrotik ssh 2026-02-02 16:42:18 -06:00
plug_exceptions.ex handle exceptions gracefully on api endpoints 2026-02-04 12:18:14 -06:00
router.ex Add 404-based brute force protection system 2026-02-10 16:31:48 -06:00
telemetry.ex fix: add Oban config to dev.exs and replace Exq telemetry with Oban 2026-01-24 16:39:45 -06:00
user_auth.ex test fixes 2026-02-09 15:30:52 -06:00