Skip to content

Add login attempt rate limiting #34

Description

@Sarmkadan

Summary

No protection against brute-force password attacks. Rate limiting failed login attempts per username and per IP would improve security.

What to do

  1. Create src/Security/LoginRateLimiter.cs
  2. Track failed attempts per username and per IP using a sliding window
  3. After N failures (configurable, default 5) in M minutes (default 15), temporarily block the username/IP
  4. Return 429 Too Many Requests with Retry-After header

Files to reference

  • src/Grants/PasswordGrantHandler.cs - login endpoint
  • src/Configuration/AuthServerOptions.cs - configuration

Important security feature - good way to understand the auth flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions