Progressive throttling with sliding windows stops brute force attacks while protecting legitimate users from false positives.
View DocumentationRate limiting controls the frequency of actions to prevent abuse while maintaining accessibility.
Brute force attacks attempt thousands of login combinations per minute. Without rate limiting, attackers can try:
Rate limiting restricts attempts to a reasonable threshold:
Saurity uses sliding window rate limiting for more accurate and fair throttling.

Window 1: 12:00-12:10
5 attempts allowed
Window 2: 12:10-12:20
5 attempts allowed
Problem: Attackers can make 10 attempts by timing requests around window boundaries (5 at 12:09, 5 at 12:10).
❌ Exploitable boundary loophole
Any 10-minute period
5 attempts maximum
Continuously tracked
No boundary resets
Benefit: Tracks the last 10 minutes continuously. No matter when attempts are made, only 5 are allowed in any 10-minute span.
✓ No exploitable loopholes
Three-layer approach: tracking, throttling, and blocking.
Every failed login is tracked by IP address using WordPress transients with automatic expiration.
Once threshold is exceeded, delays increase exponentially:
Attempt 6
2s
Attempt 7
4s
Attempt 8
8s
Attempt 9
16s
Formula: delay = base_delay × 2^(attempts - threshold)
Only after extreme abuse (20+ attempts by default) is the IP temporarily hard-blocked.
Hard blocks are deliberately conservative. Most attacks are stopped by progressive delays long before reaching this threshold.
Transients provide the perfect balance of performance, simplicity, and reliability for rate limiting.
Uses WordPress core functionality, no schema changes
Data cleans itself up, no cron jobs needed
Optimized for fast reads, can use object cache
Automatically removed with plugin deletion
Aggressive cache clearing may reset counters early
Counters reset if cache is flushed (by design)
Some hosts restrict transient size, but 5-20 timestamps fit easily
Note: These are fail-safe features, not bugs. If cache clears, counters reset and legitimate users can access immediately.
Saurity uses per-IP tracking to protect against distributed attacks while maintaining simplicity.
Tracks failed attempts by IP address, regardless of username attempted.
Would track failed attempts per username, regardless of source IP.
For v0.1, per-IP tracking provides the best balance of security and simplicity. Most brute force attacks come from single IPs or small botnets. Per-user tracking may be added in future versions for high-security environments.
All parameters are configurable to match your security requirements.
Number of failed attempts before throttling begins
Duration of the sliding window in seconds
Base delay for exponential backoff
Attempts before temporary IP block
Rate limiting controls how many requests (like login attempts) can be made in a specific time period. It prevents brute force attacks by limiting the rate at which attackers can try password combinations.
Sliding window rate limiting tracks requests within a rolling time window. Unlike fixed windows that reset at specific times, sliding windows continuously track the last N minutes of activity, providing smoother and more accurate rate limiting.
WordPress transients provide high-performance temporary storage that automatically expires. This eliminates the need for custom database tables and scheduled cleanup tasks, while still providing the speed needed for rate limiting checks on every login attempt.
Progressive rate limiting that stops attacks without blocking legitimate users.