docs: Secret reading is done using RawConfigParser, not ConfigParser.

ConfigParser makes `%` signs require escaping, which is why it is not
used in Zulip, particularly for secrets.
This commit is contained in:
Alex Vandiver 2021-12-02 22:42:36 +00:00 committed by Tim Abbott
parent 788bf8b32e
commit ab8be84b36
1 changed files with 6 additions and 5 deletions

View File

@ -68,11 +68,12 @@ In a production environment, we have:
- `/etc/zulip/zulip-secrets.conf` (generated by
`scripts/setup/generate_secrets.py` as part of installation)
contains secrets used by the Zulip installation. These are read
using the standard Python `ConfigParser`, and accessed in
`zproject/computed_settings.py` by the `get_secret` function. All
secrets/API keys/etc. used by the Zulip Django application should be
stored here, and read using the `get_secret` function in
`zproject/config.py`.
using the [standard Python
`RawConfigParser`](https://docs.python.org/3/library/configparser.html#configparser.RawConfigParser),
and accessed in `zproject/computed_settings.py` by the `get_secret`
function. All secrets/API keys/etc. used by the Zulip Django
application should be stored here, and read using the `get_secret`
function in `zproject/config.py`.
- `zproject/settings.py` is the main Django settings file for Zulip.
It imports everything from `zproject/configured_settings.py` and