-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Current Situation
Our use_user_data hook stores user data as unencrypted binary. If the user wants to encrypt certain key/values, this needs to be done manually which is highly inconvenient.
Proposed Actions
Add built-in encryption support to this hook. This design will be inspired by django-searchable-encrypted-fields.
Based on that library, here's a few specifics about the implementation:
- Create
settings.py:REACTPY_USER_DATA_ENCRYPTION_KEYS: list - Add
encrypted = models.BooleanField(default=False)toUserDataModelandComponentSession - Add new
manage.py reactpy_upgrade_data_encryptionmanagement command.- Encryption keys are upgraded lazily by default, but this command will be used to manually upgrade all data to the newest encryption key.
- Add a check to
manage.py check --deploythat warns if encryption is not enabled. - Warn if encryption keys are too short or lack entropy.