Commit graph

69 commits

Author SHA1 Message Date
Hendrik Schneider
daded0e04d seperated ci jobs 2022-04-29 08:25:06 +02:00
Hendrik Schneider
5e52b27f1d added different python versions to github actions matrix 2022-04-23 13:21:00 +02:00
Hendrik Schneider
3c717a7db9 added different python versions to github actions matrix 2022-04-23 13:18:15 +02:00
Hendrik Schneider
97472bcf92 added different python versions to github actions matrix 2022-04-23 13:13:54 +02:00
Hendrik Schneider
39a27db815 added different python versions to github actions matrix 2022-04-23 13:12:16 +02:00
Hendrik Schneider
30397323b4 setup github actions - fixed folders 2022-04-21 14:24:22 +02:00
Hendrik Schneider
a20d77e256 setup github actions with black, flake8, testing and coverage 2022-04-21 14:15:59 +02:00
naohide
04625a8e40 Fix setup.py 2021-12-19 13:19:32 +09:00
fragment
393ae0604e
Merge pull request #5 from StevenMapes/main
Fix for Error saving model in django admin
2021-12-19 13:18:23 +09:00
Steven Mapes
66f2950731
Merge pull request #1 from StevenMapes/StevenMapes-patch-1
Bug fix for #4
2021-12-17 17:29:40 +00: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
naohide
22a5cd4f84 Fix setup.py 2021-12-15 10:09:43 +09:00
fragment
9e84ed92b4
Merge pull request #3 from StevenMapes/patch-1
Updated README.md with rotating SALT documentation
2021-12-13 17:34:52 +09:00
Steven Mapes
8c39983587
Updated README.md with rotating SALT documentation
I've updated the README.md file with an explanation on how to config the multiple SALTs and how to update all records within a model that uses encrypted fields.
2021-12-10 11:11:12 +00:00
fragment
3c9a6b9349
Merge pull request #1 from StevenMapes/main
Add in support for rotating the salt but allow older records to still be read
2021-12-10 07:55:45 +09:00
Steve Mapes
7bacd9148e Adding in unit tests to test changing the salt but keeping a legacy salt in for reading 2021-12-09 10:01:51 +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
c7782281dd Fix setup.py 2021-10-01 08:04:22 +09:00
naohide
6e3ea22405 first commit 2021-09-30 23:27:19 +09:00