diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index 44925bf5a..547a81768 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -55,6 +55,7 @@ throttle: providers: oauth2: device: 20/hour + default: 1000/second outposts: # Placeholders: diff --git a/authentik/root/settings.py b/authentik/root/settings.py index ee2a52c84..c1d06c17a 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -174,6 +174,10 @@ REST_FRAMEWORK = { ], "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema", "TEST_REQUEST_DEFAULT_FORMAT": "json", + "DEFAULT_THROTTLE_CLASSES": ["rest_framework.throttling.AnonRateThrottle"], + "DEFAULT_THROTTLE_RATES": { + "anon": CONFIG.y("throttle.default"), + }, } REDIS_PROTOCOL_PREFIX = "redis://"