-
Notifications
You must be signed in to change notification settings - Fork 12
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 API Endpoints #76
base: main
Are you sure you want to change the base?
Conversation
@its-me-abhishek added as Carlos said, actually both #76 and #77 added simultaneously, so can you review them both |
you seem to have implemented the rate limiter on Oauth handlers, but not the others, what was the thought process behind this one? |
Implemented on all apis, but for testing Oauth doesnt required authentication, so to test the rate limit working, i'll use Oauth |
please elaborate, i am unable to understand :/ |
imo, as i had been planning to implement rate-limiting, it should have been implemented on the JobQueue or Task based endpoints, specifically, based on IP, as these can still be pinged over and over. The app does not contain any auth so its almost useless to implement this on only auth ones, provided the backend is meant only (for most part) for the app |
Lol, my bad.....What I intended to say is: I would like someone to review whether the rate limiting is functioning correctly. If it is, I will then apply it to the necessary APIs, such as the job queue, add task API and all. After this review, I will implement rate limiting on all other APIs as well. |
This reverts commit 7ea20e7.
Please implement that on all Endpoints, I will test that using a Postman simulator on my local machine after some time |
Also, please open relevant issues for the same, so that tracking things becomes easy in future |
Test also Added. Clients will receive these headers when rate limited:
|
Overview
Implemented IP-based rate limiting for sensitive API endpoints to protect against abuse and ensure service stability.
Changes
Implementation Details
Protected Endpoints
/auth/oauth
/auth/callback
/api/user
/auth/logout
Rate Limit Response
When limit is exceeded:
Retry-After: <window-size>
Testing
Tested with concurrent requests:
Security Impact