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

Implement rate limiting in the API #12

Open
rajdip-b opened this issue Dec 26, 2023 · 11 comments
Open

Implement rate limiting in the API #12

rajdip-b opened this issue Dec 26, 2023 · 11 comments
Labels
good first issue Good for newcomers question Further information is requested scope: api Everything related to the API type: enhancement New feature or request
Milestone

Comments

@rajdip-b
Copy link
Member

Is your feature request related to a problem? Please describe.
I would like the API to have rate limiting set up so that malicious actors can't spam our APIs.

Describe the solution you'd like
Use this document as a reference: https://docs.nestjs.com/security/rate-limiting

Suggestions for implementing this feature are most welcome!

@rajdip-b rajdip-b added type: enhancement New feature or request good first issue Good for newcomers question Further information is requested labels Dec 26, 2023
@rajdip-b rajdip-b added this to the Release v1 milestone Dec 26, 2023
@rajdip-b rajdip-b moved this to Approval required in keyshade-api Dec 26, 2023
@rajdip-b rajdip-b added the scope: api Everything related to the API label Dec 26, 2023
@Sachinsharma01
Copy link

Sachinsharma01 commented Dec 30, 2023

@rajdip-b picking this as this does not require major change, can work parallelly with create user #13
assign this to me

@rajdip-b
Copy link
Member Author

@Sachinsharma01 assigned to you. Do open a thread in discord regarding this issue since we still haven't fixed on what parameters we will do the rate limit. So you can get on with this after we have came to a decision!

@Sachinsharma01
Copy link

ok, got it

@Sachinsharma01
Copy link

As per discussion, we are going to have rate limiting as below

We would want to send OTP, validate OTP to be rate limited to 10 requests per minute for a single user
Upon multiple failures of validate OTP (20 consecutive times over any period), we want to send a mail to the user that their account failed authentication 20 times. They might want to take the necessary steps.
The rest of the endpoints will follow a standard 20-50 requests per minute based on the computation power it takes, but we will stall that for a later issue.

@rajdip-b
Copy link
Member Author

rajdip-b commented Jan 9, 2024

Yes, correct. That looks good! @Sachinsharma01

@Sachinsharma01
Copy link

yeah, picking this up for development

@rajdip-b rajdip-b moved this from Approval required to In progress in keyshade-api Jan 22, 2024
@bansal-harsh-2504
Copy link
Contributor

bansal-harsh-2504 commented Oct 23, 2024

can I work on this issue? @rajdip-b

@rajdip-b
Copy link
Member Author

Sure thing! Go ahead.

@rajdip-b
Copy link
Member Author

The requirements of this issue is still not clear, so please feel free to add a list of the implementations you would be making before you go ahead and code it.

@bansal-harsh-2504
Copy link
Contributor

But the next 10days are very hectic for me and I can only start solving after that. If that's okay with you

@rajdip-b
Copy link
Member Author

Yeah no problem with that

@bansal-harsh-2504 bansal-harsh-2504 removed their assignment Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested scope: api Everything related to the API type: enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

3 participants