Overview
PassAgent enforces per-user and per-IP rate limits on all API endpoints. Rate limits prevent abuse, credential stuffing, and denial-of-service attacks.Active rate limits
| Endpoint | Limit | Window | Mode | Key |
|---|---|---|---|---|
| Chat reset | 60 requests | 60 seconds | Fail-open | chat:reset:{userId} |
| Password reveal | 20 requests | 60 seconds | Fail-closed | reveal:{userId} |
| Password CRUD | 30 requests | 60 seconds | Fail-open | passwords:{action}:{userId} |
| Sync (pull) | 60 requests | 60 seconds | Fail-open | sync:pull:{userId} |
| Sync (push) | 30 requests | 60 seconds | Fail-open | sync:push:{userId} |
| Sharing | 20 requests | 60 seconds | Fail-open | sharing:{userId} |
| Travel fortress | 60 requests | 3600 seconds | Fail-closed | travel:{userId} |
| Travel PIN forgot | 3 requests | 3600 seconds | Fail-closed | travel:forgot:{userId} |
| 2FA enrollment | 3 requests | 60 seconds | Fail-closed | 2fa:enroll:{userId} |
| Session shares | 10 requests | 3600 seconds | Fail-open | session:{userId} |
| Identity generation | 10 requests | 60 seconds | Fail-open | identities:{userId} |
| DMS configuration | 10 requests | 60 seconds | Fail-closed | dms:{userId} |
| Import | 5 requests | 300 seconds | Fail-closed | import:{userId} |
| Reset tasks | 5 requests | 300 seconds | Fail-closed | reset:{userId} |
Enforcement modes
- Fail-open
- Fail-closed
If the rate limiter backend (Redis) is unavailable, requests are allowed through. Used for non-critical operations where availability is prioritized over strict enforcement.
Backend
- Primary: Redis (Vercel KV) with sliding window counters
- Fallback: In-memory counters per serverless instance (reset on cold start)
- Key format:
ratelimit:{action}:{identifier}
Error response
When a rate limit is exceeded:rate_limit and metadata including the endpoint and limit configuration.
Step-up authentication
Certain endpoints require step-up authentication in addition to rate limiting. Step-up auth verifies that the user has authenticated recently (within a configurable window):| Endpoint | Step-up window |
|---|---|
| Password sharing | 5 minutes |
| DMS configuration | 90 seconds |
| Session shares | 300 seconds |
| Password import | Risk-adaptive |