This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Application Services are rate-limited by IP address on /login #8846
Labels
A-Application-Service
Related to AS support
z-bug
(Deprecated Label)
Z-Help-Wanted
We know exactly how to fix this issue, and would be grateful for any contribution
Since MSC2778's implementation application services are able to use
/login
to login as an interested user and create a device which aids them in performing end-to-end encryption.However,
/login
has a ratelimit on it which is IP-based:synapse/synapse/rest/client/v1/login.py
Lines 117 to 126 in 514a240
This is obviously quite bad news for application services that need to login to a lot of user accounts on startup or somesuch. Currently there is no way to override this ratelimit.
As a solution, I propose only calling upon the ratelimiter for non
uk.half-shot.msc2778.login.application_service
identifier types (aka non-AS requests). If the request cannot be authenticated via an access token, it will immediately be rejected.We may also want to move this line:
synapse/synapse/rest/client/v1/login.py
Line 120 in 514a240
as someone could technically supply a huge JSON body over and over and upset the server that way.
The text was updated successfully, but these errors were encountered: