Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rate-limiting to OTP endpoints #595

Open
LoneRifle opened this issue Jun 23, 2021 · 2 comments
Open

Add rate-limiting to OTP endpoints #595

LoneRifle opened this issue Jun 23, 2021 · 2 comments

Comments

@LoneRifle
Copy link
Contributor

To prevent brute force attacks aimed at gaining unauthorized access, rate-limiting should be introduced to the endpoints that handle OTP requests. Given that we already use Sequelize to hold state, we should use Sequelize to track statistics relevant to rate-limiting.

@lamkeewei
Copy link
Contributor

Thinking of introducing node-rate-limiter-flexible for this given that it has support for Postgres as a backing store. Thoughts?

@prestonlimlianjie
Copy link
Contributor

prestonlimlianjie commented Aug 16, 2021

+1 to the library. Given that we've decided to use SQLite for the repo's default storage, we can use node-rate-limiter-flexible's in-memory mode https://github.com/animir/node-rate-limiter-flexible/wiki/Memory

@lamkeewei reminded me that Nest.js has a way of doing it within the framework

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

No branches or pull requests

3 participants