refactor Replace django-ratelimit-backend with django-ratelimit
We use django-ratelimit to limit per IP login attempts, and then we use django-ratelimit-backend to limit per username login attempts. This change replaces the usage of django-ratelimit-backend with another instance of django-ratelimit so that both limits can be managed by one library. This is the first step in being able to fully excise django-ratelimit-backend from edx-platform. Note that we're still using the `RateLimitMixin` in openedx/core/djangoapps/oauth_dispatch/dot_overrides/backends.py because studio and the admin UI still relies on that for rate limiting. Those login paths will have to be updated before we can remove the mixin from our auth backend.
This commit is contained in:
@@ -2325,6 +2325,7 @@ DISABLE_DEPRECATED_SIGNUP_URL = False
|
||||
|
||||
##### LOGISTRATION RATE LIMIT SETTINGS #####
|
||||
LOGISTRATION_RATELIMIT_RATE = '100/5m'
|
||||
LOGISTRATION_PER_EMAIL_RATELIMIT_RATE = '30/5m'
|
||||
LOGISTRATION_API_RATELIMIT = '20/m'
|
||||
|
||||
##### REGISTRATION RATE LIMIT SETTINGS #####
|
||||
|
||||
@@ -327,6 +327,7 @@ PROCTORING_USER_OBFUSCATION_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'
|
||||
|
||||
##### LOGISTRATION RATE LIMIT SETTINGS #####
|
||||
LOGISTRATION_RATELIMIT_RATE = '5/5m'
|
||||
LOGISTRATION_PER_EMAIL_RATELIMIT_RATE = '6/5m'
|
||||
LOGISTRATION_API_RATELIMIT = '5/m'
|
||||
|
||||
REGISTRATION_VALIDATION_RATELIMIT = '5/minute'
|
||||
|
||||
Reference in New Issue
Block a user