Commit graph

13 commits

Author SHA1 Message Date
Vojtěch Oram
05be6f7bc4 Fixed getting SECRET_KEY_FALLBACKS for django <4.1 2025-02-18 15:26:33 +01:00
Vojtěch Oram
3e934dc86e Added ability to use Django's SECRET_KEY_FALLBACKS to rotate secret key 2025-02-18 15:11:15 +01:00
frgmt
cf489b71af Fix lint error 2025-01-06 11:16:57 +09:00
Friday Godswill
88240245a6 Remove unused imports 2023-07-18 07:17:13 +02:00
Friday Godswill
1ac8deb229 Add support for encrypted JSON fields 2023-07-18 06:55:25 +02:00
naohide anahara
8c6563c0f3 Fix EncryptedIntegerField and testcase 2022-05-07 08:23:24 +09:00
naohide anahara
025afa1987 Fix get_prep_value and to_python function 2022-05-06 22:55:52 +09:00
naohide anahara
9ec3563bfa Fix EncryptedIntegerField 2022-05-06 22:38:10 +09:00
naohide anahara
5c00880dd1 Fix #10 2022-05-06 09:38:20 +09:00
Hendrik Schneider
a20d77e256 setup github actions with black, flake8, testing and coverage 2022-04-21 14:15:59 +02:00
Steven Mapes
9630b3e5e2
Bug fix for #4
This is a bug fix for issue #4 where Django Admin raises an exception when saving Encrypted fields as the value is not encrypted at the time of the clean process.

This PR sets a semaphore property which is checked within the to_python method allowing the decryption to be skipped. It then removes the semaphore property to clean up the field
2021-12-17 17:29:10 +00:00
Steven Mapes
43c0752252
Adding in support for multiple SALTs thus allowing them to be rotated
This commit adds in support for the SALT to be rotated by defining a list of salts within settings.py where the newer salts are added to the start.  

The first key will be used to encrypt all new data, and decryption of existing values will be attempted with all given keys in order. This is useful for key rotation: place a new key at the head of the list for use with all new or changed data, but existing values encrypted with old keys will still be accessible

This is based of django-fernet-fields which is a dead package but has some useful features such as this to allow the salt to be rotated in the future for a stronger salt.

```
SALT_KEY = [
    'my-newer-salt',
    'the-original-salt'
]
```
2021-12-08 11:12:44 +00:00
naohide
6e3ea22405 first commit 2021-09-30 23:27:19 +09:00