Add encryption support to `use_user_data` hook

未關閉
#193 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
django, python
領域
backend, security

研究方向

Start by tracing the use_user_data hook and the UserDataModel and ComponentSession definitions, then inspect settings.py and the manage.py command entry points. The work is complete when encrypted storage, key rotation, the reactpy_upgrade_data_encryption command, the deploy warning, and short or low-entropy key warnings are covered.

由索引模型根據 Issue 內容生成。

描述

complexity: 2 (medium) priority: 3 (low)
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:

  1. Create settings.py:REACTPY_USER_DATA_ENCRYPTION_KEYS: list
  2. Add encrypted = models.BooleanField(default=False) to UserDataModel and ComponentSession
  3. Add new manage.py reactpy_upgrade_data_encryption management command.
    • Encryption keys are upgraded lazily by default, but this command will be used to manually upgrade all data to the newest encryption key.
  4. Add a check to manage.py check --deploy that warns if encryption is not enabled.
  5. Warn if encryption keys are too short or lack entropy.
主要語言
Python
星號
357
分支
22
平均合併
10 小時 31 分鐘
30 天內合併 PR
2

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

reactive-python/reactpy-django 的其他 Issue

查看 reactive-python/reactpy-django 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。