Commit da18fc1
authored
New auto decryption (#65)
* Refactored lookups and mixins
* Added support for auto decryption without crazy managers extra sql. The old custom manager broke support for defer() and only() which this restores. This also adds support for filtering on encrypted fields with any supported built-in WITHOUT having to use annotate / aggregates.
* Added support for auto decryption of foreign key tables without additional queries or annotations / aggregations
* Added test demostrating support for get_by_natural_key(). Fixes #23
* Added tests demonstrating support for get_or_create() and update_or_create()
* Added tests demonstrating support for get_or_create() and update_or_create()
* Fix flake8 errors
* Updated CHANGELOG
* * Updated CHANGELOG to include upgrade instructions
* Removed admin, manager, aggregates
* Updated tests
* Fixes to tests
* Improved make file
* Fix flake8
* Fixes per feedback on PR #65 (tests for aggregate, distinct, annotate)
* Added test for `distinct()` and related documentation for workaround for 2.0.x and lower
* Updated CHANGELOG, fixed spelling typo
* Added additional assertions for test_aggregates()
* Fixed issue with relabel_clone calling DecryptCol which "had" a different constructor signature than Col. Extract the decyrpt sql and cast type from the target instead.
django/db/models/expressions.py", line 745, in relabeled_clone
return self.__class__(relabels.get(self.alias, self.alias), self.target, self.output_field)
* Removed unneed use_for_related_fields = True, use_in_migrations = True
* Test for alias of get_col() for DecryptedCol
* Code cleanup
* Added PyUp safety checks
* Separated out dev/maintainers requirements into requirements_dev.txt so it simplifies what is needed for install
* * Updated packaging / setup.py to include long description
* Added AUTHORS and updated CONTRIBUTING
* Fixed makefile
* Updated TravisCI to use Xenial to gain Python 3.7 in the matrix
* Removed compatibility code for Django 1.7 and lower. The lowest version we support is Django 1.11.
* Added HTML for coverage1 parent aef1c4b commit da18fc1
File tree
21 files changed
+680
-448
lines changed- pgcrypto
- tests
21 files changed
+680
-448
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
2 | 15 | | |
3 | 16 | | |
4 | 17 | | |
| |||
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
13 | 30 | | |
14 | 31 | | |
15 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
10 | 96 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 97 | + | |
15 | 98 | | |
| 99 | + | |
16 | 100 | | |
17 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
18 | 108 | | |
19 | | - | |
| 109 | + | |
20 | 110 | | |
21 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
22 | 114 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
3 | 28 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 29 | + | |
7 | 30 | | |
8 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
9 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
10 | 44 | | |
11 | 45 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments