zulip/scripts/setup
Anders Kaseorg b7b7475672 python: Use standard secrets module to generate random tokens.
There are three functional side effects:

• Correct an insignificant but mathematically offensive bias toward
repeated characters in generate_api_key introduced in commit
47b4283c4b4c70ecde4d3c8de871c90ee2506d87; its entropy is increased
from 190.52864 bits to 190.53428 bits.

• Use the base32 alphabet in confirmation.models.generate_key; its
entropy is reduced from 124.07820 bits to the documented 120 bits, but
now it uses 1 syscall instead of 24.

• Use the base32 alphabet in get_bigbluebutton_url; its entropy is
reduced from 51.69925 bits to 50 bits, but now it uses 1 syscall
instead of 10.

(The base32 alphabet is A-Z 2-7.  We could probably replace all of
these with plain secrets.token_urlsafe, since I expect most callers
can handle the full urlsafe_b64 alphabet A-Z a-z 0-9 - _ without
problems.)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-09 15:52:57 -07:00
..
configure-rabbitmq configure-rabbitmq: Allow running as root. 2019-04-04 16:52:20 -07:00
create-db.sql create-db.sql: Ensure using en_US.UTF-8 encoding. 2020-08-24 12:24:38 -07:00
create-pgroonga.sql postgres-create-db: Split into non-pgroonga and pgroonga scripts. 2019-07-17 16:18:22 -07:00
debathena-archive.asc scripts: Initialize setup-apt-repo-debathena. 2018-12-11 13:01:26 -08:00
flush-memcached memcached: Switch from pylibmc to python-binary-memcached. 2020-08-06 12:51:14 -07:00
generate-self-signed-cert generate-self-signed-cert: Correct subjectAltName for an IP address. 2020-06-29 22:19:47 -07:00
generate_secrets.py python: Use standard secrets module to generate random tokens. 2020-09-09 15:52:57 -07:00
initialize-database install: Don't create internal realm in the installation process. 2020-02-12 12:00:10 -08:00
inline_email_css.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
install install, provision: Treat all nonzero exit codes as failure, not just 1. 2019-07-19 11:22:11 -07:00
pgdg.asc install: Use the apt postgres server packages from postgres. 2020-06-16 17:05:46 -07:00
pgroonga-debian.asc setup: Update groonga APT repository signing key. 2019-09-23 16:01:39 -07:00
pgroonga-ppa.asc
postgres-init-db postgres-init-db: Read terminate-psql-sessions script as root. 2020-07-02 14:54:36 -07:00
restore-backup python: Pre-fix a few spots for better Black formatting. 2020-09-03 17:51:09 -07:00
setup-certbot certbot: Switch to use certbot from apt. 2020-06-08 21:59:29 -07:00
sha256-tarball-to puppet: Generalize install-wal-g to be arbitrary tarballs. 2020-07-24 17:24:57 -07:00
terminate-psql-sessions terminate-psql-sessions: Rely on the caller to set PGHOST, PGUSER. 2020-06-15 21:37:14 -07:00
upgrade-postgres upgrade: Add additional comments. 2020-07-13 12:47:49 -07:00