mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:53:00 +03:00
🚀 Feature: rate limit brute force protection #57
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lordraiden on GitHub.
Feature description
A determined attacker can spam the /api/webauthn/login/finish endpoint with millions of crafted assertions, trying to:trigger the passkey device repeatedly (DoS against the user’s phone/YubiKey), orfind implementation bugs (signature malleability, TOFU downgrades, etc.)
With a SQLite backend by default each failed assertion = 1 DB write. A trivial for loop can fill the disk or exhaust IOPS.
Current code ( backend/internal/handler/webauthn.go ) returns 400/401 on failure but does not count or block. No metrics, no logs with IP/user correlation.
Pitch
This is the technical proposal of AI in case it could be helpful
https://chatgpt.com/s/t_68b1c2af33f08191a31f4625b54dc757
@stonith404 commented on GitHub:
We already have a global rate limiter and specific limits for critical endpoints. See here:
4a1e116b81/backend/internal/controller/webauthn_controller.go (L24)