Skip to content

Limit failed login attempts #68

@Mateusz-Dobrzynski

Description

@Mateusz-Dobrzynski

As of now, we don't have any limits on failed login attempts recommended by OWASP A07:2021 – Identification and Authentication Failures. We should implement them to prevent brute force attacks.

TO-DO:

  • Create a new database table for logging failed login attempts including:
    • Username,
    • Failed login timestamp.
  • On a login attempt, make a query for failed login attempts within the last 60 seconds. If there were more than 5 failed attempts, automatically discard the request returning 429 (Too Many Requests) with a Retry-After header indicating a delay of 60 seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions