Skip to content

[Security]: Use a distributed rate limiter for portal login attempts #24

Description

@awatchar

Problem

The portal login limiter is process-local, so counters reset across serverless instances and cold starts.

Scope

  • Move login throttling to shared production storage with atomic updates.
  • Use a privacy-safe bounded key and expiry.
  • Keep deterministic in-memory behavior for local/test environments where appropriate.
  • Define explicit fail-safe behavior when shared storage is unavailable.
  • Do not change the accepted Device-ID configuration delivery model.

Acceptance

  • Concurrent attempts across simulated instances share one limit.
  • Expiry, successful-login reset and storage failure behavior are tested.
  • No raw password, session token or unnecessary full IP address is stored.
  • Portal tests, typecheck and production build pass.
  • Production deployment and unauthenticated smoke check succeed after merge.

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