Skip to content

Authentication Rate Limiting

Akram El Assas edited this page Nov 30, 2026 · 2 revisions

Wexflow includes a built-in, in-memory rate limiter (AuthRateLimiter) to protect authentication and password recovery endpoints against brute-force attacks, credential stuffing, and email flooding.

When a client or account exceeds the configured threshold, the server responds with HTTP 429 Too Many Requests along with a Retry-After header indicating how many seconds remain before the lockout or quota window resets.

Protected Routes

Rate limiting applies to the following unauthenticated endpoints across both the .NET 10 (api/v1) and .NET Framework 4.8 servers:

Endpoint Method Tracked Keys Behavior When Limit Exceeded
/login POST Normalized username and client IP address Blocks further login attempts for LoginLockoutMinutes (HTTP 429). Counters clear automatically upon a valid login or password reset confirmation.
/reset-password POST Normalized username (u query parameter) and client IP address Rejects additional reset email requests until the current ResetWindowMinutes window expires (HTTP 429).
/confirm-password-reset POST Client IP address Rejects additional token confirmation attempts until the current ResetWindowMinutes window expires (HTTP 429).

Note

Password reset tokens are stored in memory as SHA-256 hashes, expire after ResetTokenLifetimeMinutes, and are invalidated immediately upon first use or when a newer token is issued for the same account. Restarting Wexflow.Server clears in-memory rate-limit counters and pending reset tokens.

Configuration Settings

You can customize the rate limiter and reset-token lifetime in appsettings.json (.NET 10) or Wexflow.Server.exe.config (.NET Framework 4.8). All values must be positive integers; if a setting is omitted or invalid, the default value is used.

Setting Default Description
MaxLoginFailuresPerUser 10 Maximum failed login attempts allowed for a single username within LoginWindowMinutes before locking out that account.
MaxLoginFailuresPerIp 30 Maximum failed login attempts allowed from a single client IP address within LoginWindowMinutes before blocking that IP.
LoginWindowMinutes 30 Sliding/fixed tracking window (in minutes) for counting failed login attempts.
LoginLockoutMinutes 30 Duration (in minutes) that an account or IP remains blocked after exceeding the failed login threshold.
MaxResetRequestsPerWindow 5 Maximum password reset link requests allowed per username and per client IP within ResetWindowMinutes.
MaxConfirmAttemptsPerWindow 10 Maximum password reset confirmation submissions allowed per client IP within ResetWindowMinutes.
ResetWindowMinutes 30 Quota tracking window (in minutes) for /reset-password and /confirm-password-reset requests.
ResetTokenLifetimeMinutes 30 Validity duration (in minutes) of an emailed password reset link before the single-use token expires.

Configuration Examples

.NET 10 (Wexflow.Server/appsettings.json)

Changes to appsettings.json are reloaded automatically at runtime without restarting the server.

{
  "MaxLoginFailuresPerUser": 10,
  "MaxLoginFailuresPerIp": 30,
  "LoginWindowMinutes": 30,
  "LoginLockoutMinutes": 30,
  "MaxResetRequestsPerWindow": 5,
  "MaxConfirmAttemptsPerWindow": 10,
  "ResetWindowMinutes": 30,
  "ResetTokenLifetimeMinutes": 30
}

.NET Framework 4.8 (%ProgramFiles%\Wexflow.Server.exe.config)

Add or update the keys inside the <appSettings> section and restart the Wexflow Windows service for changes to take effect.

<appSettings>
  <add key="MaxLoginFailuresPerUser" value="10" />
  <add key="MaxLoginFailuresPerIp" value="30" />
  <add key="LoginWindowMinutes" value="30" />
  <add key="LoginLockoutMinutes" value="30" />
  <add key="MaxResetRequestsPerWindow" value="5" />
  <add key="MaxConfirmAttemptsPerWindow" value="10" />
  <add key="ResetWindowMinutes" value="30" />
  <add key="ResetTokenLifetimeMinutes" value="30" />
</appSettings>

Reverse Proxy & Shared NAT Considerations

  • Shared Office IPs: Because IP quotas apply per client IP address, deployments where multiple administrators share a single outbound NAT IP may want to increase MaxLoginFailuresPerIp (e.g., 50) and MaxResetRequestsPerWindow (e.g., 10).
  • Reverse Proxies (NGINX, IIS, Caddy): Ensure your reverse proxy forwards the real client IP address (X-Forwarded-For / forwarded headers) so all users do not share the proxy's local address (127.0.0.1).
  1. Home
  2. Install Guide
  3. Migration Guide to v10.0
  4. Authentication Rate Limiting
  5. HTTPS/SSL
  6. Screenshots
  7. Docker
  8. Configuration Guide
    1. Wexflow Server
    2. Wexflow.xml
    3. Admin Panel
    4. Authentication
  9. Persistence Providers
  10. Getting Started
  11. Android App
  12. Local Variables
  13. Global Variables
  14. REST Variables
  15. Functions
  16. Cron Scheduling
  17. Command Line Interface (CLI)
  18. REST API Reference
    1. Introduction
    2. Authentication
    3. Sample Clients
      1. C# Client
      2. PowerShell Client
      3. JavaScript Client
      4. PHP Client
      5. Python Client
      6. Go Client
      7. Rust Client
      8. Ruby Client
      9. Java Client
      10. C++ Client
    4. Security Considerations
    5. Swagger
    6. Workflow Notifications via SSE
      1. C# SSE Client
      2. PowerShell SSE Client
      3. JavaScript SSE Client
      4. PHP SSE Client
      5. Python SSE Client
      6. Go SSE Client
      7. Rust SSE Client
      8. Ruby SSE Client
      9. Java SSE Client
      10. C++ SSE Client
    7. Endpoints
  19. Samples
    1. Sequential workflows
    2. Execution graph
    3. Flowchart workflows
      1. If
      2. While
      3. Switch
    4. Approval workflows
      1. Simple approval workflow
      2. OnRejected workflow event
      3. YouTube approval workflow
      4. Form submission approval workflow
    5. Workflow events
  20. Logging
  21. Custom Tasks
    1. Introduction
    2. General
      1. Creating a Custom Task
      2. Wexflow Task Class Example
      3. Task Status
      4. Settings
      5. Loading Files
      6. Loading Entities
      7. Need A Starting Point?
    3. Installing Your Custom Task in Wexflow
      1. .NET Framework 4.8 (Legacy Version)
      2. .NET 8.0+ (Stable Version)
      3. Referenced Assemblies
      4. Updating a Custom Task
      5. Using Your Custom Task
    4. Suspend/Resume
    5. Logging
    6. Files
    7. Entities
    8. Shared Memory
    9. Designer Integration
      1. Registering the Task
      2. Adding Settings
    10. How to Debug a Custom Task?
  22. Built-in Tasks
    1. File system tasks
    2. Encryption tasks
    3. Compression tasks
    4. Iso tasks
    5. Speech tasks
    6. Hashing tasks
    7. Process tasks
    8. Network tasks
    9. XML tasks
    10. SQL tasks
    11. WMI tasks
    12. Image tasks
    13. Audio and video tasks
    14. Email tasks
    15. Workflow tasks
    16. Social media tasks
    17. Waitable tasks
    18. Reporting tasks
    19. Web tasks
    20. Script tasks
    21. JSON and YAML tasks
    22. Entities tasks
    23. Flowchart tasks
    24. Approval tasks
    25. Notification tasks
    26. SMS tasks
  23. Run from Source
  24. Fork, Customize, and Sync

Clone this wiki locally