zulip/requirements
Alex Vandiver 49ad188449 rate_limit: Add a flag to lump all TOR exit node IPs together.
TOR users are legitimate users of the system; however, that system can
also be used for abuse -- specifically, by evading IP-based
rate-limiting.

For the purposes of IP-based rate-limiting, add a
RATE_LIMIT_TOR_TOGETHER flag, defaulting to false, which lumps all
requests from TOR exit nodes into the same bucket.  This may allow a
TOR user to deny other TOR users access to the find-my-account and
new-realm endpoints, but this is a low cost for cutting off a
significant potential abuse vector.

If enabled, the list of TOR exit nodes is fetched from their public
endpoint once per hour, via a cron job, and cached on disk.  Django
processes load this data from disk, and cache it in memcached.
Requests are spared from the burden of checking disk on failure via a
circuitbreaker, which trips of there are two failures in a row, and
only begins trying again after 10 minutes.
2021-11-16 11:42:00 -08:00
..
README.md docs: Fix list item indentation mistakes. 2021-08-20 23:14:37 -07:00
common.in rate_limit: Add a flag to lump all TOR exit node IPs together. 2021-11-16 11:42:00 -08:00
dev.in requirements: Upgrade Python requirements. 2021-11-02 16:30:42 -07:00
dev.txt rate_limit: Add a flag to lump all TOR exit node IPs together. 2021-11-16 11:42:00 -08:00
docs.in requirements: Upgrade Python requirements. 2021-09-17 17:05:18 -07:00
docs.txt requirements: Upgrade Python requirements. 2021-11-02 16:30:42 -07:00
mypy.in requirements: Ensure that importlib-metadata installs on > py3.8. 2021-11-02 16:02:22 -07:00
mypy.txt requirements: Upgrade Python requirements. 2021-11-02 16:30:42 -07:00
pip.in requirements: Upgrade Python requirements. 2021-05-07 22:42:39 -07:00
pip.txt requirements: Upgrade Python requirements. 2021-11-02 16:30:42 -07:00
prod.in requirements: Remove unnecessary version bounds from *.in. 2019-09-23 13:23:58 -07:00
prod.txt rate_limit: Add a flag to lump all TOR exit node IPs together. 2021-11-16 11:42:00 -08:00

README.md

The dependency graph of the requirements is as follows:

dev +-> prod +-> common
+
|
v
mypy,docs,pip

Of the files, only dev, prod, and mypy have been used in the install scripts directly. The rest are implicit dependencies.

Steps to update a lock file, e.g. to update ipython from 5.3.0 to latest version:

  1. Remove entry for ipython==5.3.0 in dev.txt.
  2. Run ./tools/update-locked-requirements, which will generate new entries, pinned to the latest version.
  3. Increase PROVISION_VERSION in version.py.
  4. Run ./tools/provision to install the new deps and test them.
  5. Commit your changes.