zulip/zerver/management/commands
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
..
__init__.py
add_scim_client.py auth: Add support for using SCIM for account management. 2021-10-14 12:29:10 -07:00
add_users_to_streams.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
archive_messages.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
audit_fts_indexes.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
backup.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
bulk_change_user_name.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
change_password.py management: Add change_password command. 2021-07-09 12:34:39 -07:00
change_realm_subdomain.py commands: Add change_realm_subdomain management command. 2021-05-10 12:30:58 -07:00
change_user_email.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
change_user_role.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
check_redis.py check_redis: Fix for key format change and Python 3. 2021-07-05 12:23:06 -07:00
checkconfig.py install: Remove references to "Zulip Voyager". 2020-01-30 12:40:41 -08:00
compilemessages.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
convert_gitter_data.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
convert_mattermost_data.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
convert_rocketchat_data.py data_import: Add rocket chat import tool. 2021-07-28 15:28:56 -07:00
convert_slack_data.py data_import: Support importing from Slack conversions in a directory. 2021-05-27 22:46:58 -07:00
create_default_stream_groups.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
create_large_indexes.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
create_realm_internal_bots.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
create_stream.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
create_user.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
deactivate_realm.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
deactivate_user.py python: Fix mypy no_implicit_reexport errors. 2021-07-16 14:02:31 -07:00
delete_old_unclaimed_attachments.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
delete_realm.py delete_realm: Allow deletion of realms with empty customers. 2021-08-02 22:29:16 -07:00
delete_user.py python: Fix mypy no_implicit_reexport errors. 2021-07-16 14:02:31 -07:00
deliver_scheduled_emails.py scheduled_email: Consistently lock users table. 2021-08-19 00:44:33 -07:00
deliver_scheduled_messages.py message send: Pass individual parameters instead of single Dict. 2021-05-20 11:06:19 -07:00
edit_linkifiers.py python: Fix mypy no_implicit_reexport errors. 2021-07-16 14:02:31 -07:00
email_mirror.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
enqueue_digest_emails.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
enqueue_file.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
export.py export: Remove `--delete-after-upload` flag in realm export. 2021-11-03 11:14:02 -07:00
export_single_user.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
export_usermessage_batch.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
fetch_tor_exit_nodes.py rate_limit: Add a flag to lump all TOR exit node IPs together. 2021-11-16 11:42:00 -08:00
fill_memcached_caches.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
generate_realm_creation_link.py python: Fix mypy no_implicit_reexport errors. 2021-07-16 14:02:31 -07:00
get_migration_status.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
import.py import: Fix propagation of subdomain error messages. 2021-06-09 12:58:05 -07:00
list_realms.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
logout_all_users.py docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
makemessages.py python: Remove re.UNICODE flag (redundant in Python 3). 2021-10-22 13:42:29 -07:00
merge_streams.py actions: Remove acting_client parameter from bulk_remove_subscriptions. 2021-08-19 01:51:37 -07:00
process_queue.py process_queue: Rename Threaded_worker to ThreadedWorker. 2021-11-16 11:21:05 -08:00
purge_queue.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
query_ldap.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
rate_limit.py python: Fix mypy no_implicit_reexport errors. 2021-07-16 14:02:31 -07:00
reactivate_realm.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
realm_domain.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
register_server.py outgoing_http: Use OutgoingSession subclasses in more places. 2021-09-01 05:34:13 -07:00
remove_users_from_stream.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
rename_stream.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
reset_authentication_attempt_count.py management: Rename clear_auth_rate_limit_history command. 2021-08-23 11:52:35 -07:00
restore_messages.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
runtornado.py tornado: Move SIGTERM shutdown handler into a callback. 2021-11-12 09:57:23 -08:00
scrub_realm.py management: Use required kwargs in add_realm_args. 2021-05-10 12:30:58 -07:00
send_custom_email.py realm: Rename plan type constants to be more descriptive. 2021-10-19 12:20:39 -07:00
send_password_reset_email.py python: Fix mypy no_implicit_reexport errors. 2021-07-16 14:02:31 -07:00
send_realm_reactivation_email.py python: Fix mypy no_implicit_reexport errors. 2021-07-16 14:02:31 -07:00
send_test_email.py send_test_email: Capture and show SMTP log on errors. 2021-06-02 13:18:11 -07:00
send_to_email_mirror.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
send_webhook_fixture_message.py management: Fix typing for management scripts. 2021-08-20 05:54:18 -07:00
show_admins.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
soft_deactivate_users.py docs: Fix capitalization mistakes. 2021-05-10 09:57:26 -07:00
sync_ldap_user_data.py sync_ldap_user_data: Log all exceptions. 2021-08-24 07:51:48 -07:00
transfer_uploads_to_s3.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00