Commit graph

47 commits

Author SHA1 Message Date
fragment
df0df57b69
Merge pull request #24 from flaiming/secret-key-fallbacks
Added ability to use Django's SECRET_KEY_FALLBACKS to rotate secret key
2025-02-19 17:17:50 +09:00
fragment
9a3eaf8aed
Merge pull request #23 from jazzband/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-02-19 16:57:47 +09:00
Vojtěch Oram
83194fbf4c Updated README - added paragraph about rotating secret key 2025-02-18 15:36:46 +01:00
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
pre-commit-ci[bot]
0d3edd12b2
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0)
- [github.com/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.1.0...v4.0.0-alpha.8)
- [github.com/asottile/pyupgrade: v3.16.0 → v3.19.1](https://github.com/asottile/pyupgrade/compare/v3.16.0...v3.19.1)
2025-01-06 17:54:58 +00:00
fragment
adc35e961d
Merge pull request #22 from frgmt/main
Fix to use ruff and fix some
2025-01-06 11:38:43 +09:00
frgmt
63362d5804 Add pre-commit config and fix for it 2025-01-06 11:38:01 +09:00
frgmt
a422d6c4b8 Fix event trigger 2025-01-06 11:26:24 +09:00
frgmt
292d2e2602 Chore 2025-01-06 11:18:09 +09:00
frgmt
b14cb14938 Fix github workflow 2025-01-06 11:18:01 +09:00
frgmt
f54b18e9f2 Remove travis setting 2025-01-06 11:17:22 +09:00
frgmt
cf489b71af Fix lint error 2025-01-06 11:16:57 +09:00
fragment
755636a27a
Update README.md 2023-07-31 09:12:14 +01:00
fragment
c2261fa05c
Merge pull request #15 from frgmt/fixes/required-django-version
Fix minimum django version to 3.2
2023-07-24 16:15:01 +01:00
Naohide Anahara
4914aa827c Fix minimum django version to 3.2 2023-07-24 16:12:19 +01:00
fragment
295f84f40c
Merge pull request #14 from faradayyg/feature/encrypt-json-fields
Add support for encrypted JSON fields
2023-07-24 15:55:13 +01:00
Friday Godswill
88240245a6 Remove unused imports 2023-07-18 07:17:13 +02:00
Friday Godswill
bbc9b0f768 Add tests that ensure keys are retained, update default arg for json TestModel field 2023-07-18 07:15:47 +02:00
Friday Godswill
1ac8deb229 Add support for encrypted JSON fields 2023-07-18 06:55:25 +02:00
fragment
935453a6d5
Merge pull request #11 from frgmt/hotfix/EncryptedIntegerField
Fix #10
2022-05-07 19:38:05 +09: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
fragment
89f3acff8a
Merge pull request #8 from hendrikschneider/main
setup github actions with black, flake8, testing and coverage
2022-05-06 09:29:46 +09:00
Hendrik Schneider
f2b475fe17 moved black to linting job 2022-04-29 13:40:26 +02:00
Hendrik Schneider
595a90b9de moved black to linting job 2022-04-29 13:39:50 +02:00
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