-
Notifications
You must be signed in to change notification settings - Fork 201
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 API rate limiting #460
Comments
The restframework comes with the throttling feature. If we could decide on the default limits, I'd love to open a PR for the same. |
Using the DRF AnonRateThrottle should be good enough for a start |
At this stage we do not have anythin beyond basic auth We should enable the "classic" API key system for DRF API access. For now we barely enabled "django.contrib.auth", and "rest_framework.authtoken" in the settings https://github.com/nexB/vulnerablecode/blob/479111359070cc09010bde343e210306c4b14e40/vulnerablecode/settings.py ... But we should emulate what is done in ScanCode.io ... see aboutcode-org/scancode.io#368 and aboutcode-org/scancode.io#359 |
For now, I think we will not need rate limiting once we implement auth... that's a refinement for later |
Added authentication here #848 |
As a first step when we make the public instance public I suggest this:
We need to add link/content in the UI to explain how to request an API key. |
Deploying without any guards against API spam, is a bad idea. Especially since we need to do quite a work and API payload is big.
The text was updated successfully, but these errors were encountered: