Skip to content

Commit 63fc174

Browse files
committed
small documentation update for new encryption scheme
1 parent 4c2f672 commit 63fc174

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

docs/customization/encrypted_model_fields.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,13 @@ As such, the model *should not define a* ``user`` *property of its own*.
8080
Some Explanations
8181
-----------------
8282

83-
EncryptableModelMixin (`source <https://github.com/TOMToolkit/tom_base/blob/069024f954e5540c1441c5186378de538f7d606f/tom_common/models.py#L100>`__)
84-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85-
The User's data is encrypted using (among other things) their password (i.e the
86-
password they use to login to your TOM). When the User changes their password,
87-
their encrypted data re-encrypted accordingly. The ``EncryptableModelMixin`` adds
88-
method for this to your otherwise normal Django model.
83+
EncryptableModelMixin
84+
~~~~~~~~~~~~~~~~~~~~~
85+
An abstract Django model mixin that provides a standardized ``user`` OneToOneField.
86+
Any model that stores encrypted data via ``EncryptedProperty`` should inherit from
87+
this mixin. The ``user`` field ties encrypted data to its owner, allowing the
88+
helper functions in ``session_utils`` to look up the user's Data Encryption Key
89+
(DEK) and build the cipher needed for encryption and decryption.
8990

9091
EncryptedProperty (`source <https://github.com/TOMToolkit/tom_base/blob/069024f954e5540c1441c5186378de538f7d606f/tom_common/models.py#L39>`__)
9192
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)