Skip to content

fix(security): make rate-limit failure policy configurable and fail-closed for auth/OTP endpoints #180

Description

Summary

internal/api/middleware/ratelimit.go:35-37 fails open (falls back to in-memory limiter) on Redis outage. For auth/OTP/swap endpoints this weakens DoS and brute-force protection exactly when the shared limiter is down.

Acceptance Criteria

  • Per-route failure policy (fail-closed for sensitive routes)
  • Fail-open only for low-risk GET routes
  • Tests for Redis-down behavior per policy

Complexity

High.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programhigh-complexityHigh-complexity backend task requiring deep architectural worksecuritySecurity vulnerability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions