Skip to content

fix(kyc): configure submission rate limits - #595

Open
hayor1 wants to merge 1 commit into
arflexx:mainfrom
hayor1:fix/issue-485
Open

hayor1 wants to merge 1 commit into
arflexx:mainfrom
hayor1:fix/issue-485

Conversation

@hayor1

@hayor1 hayor1 commented Oct 26, 2026

Copy link
Copy Markdown

Summary

  • Read KYC submission limits from KYC_MAX_SUBMISSIONS and KYC_WINDOW_MINUTES, with validated defaults of 3 and 60.
  • Add a database-backed IP fallback for requests without an authenticated user, including a migration and supporting index.
  • Verify excess submissions return 429 with a Retry-After header and that the IP fallback records the request identity.

Validation

  • npm test -- --runTestsByPath src/middleware/rateLimitKyc.test.ts — passed (2 tests).
  • npm run lint reports pre-existing errors in notification template modules and tests, unrelated to the KYC changes.
  • Full diff scan and git diff --check — passed.

Closes #485

@hayor1
hayor1 requested a review from dark-sarge as a code owner October 26, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] - Add Rate Limiting for KYC Document Submissions

1 participant