1
+ .. _configuring-queryable-encryption :
2
+
1
3
================================
2
4
Configuring Queryable Encryption
3
5
================================
@@ -11,8 +13,6 @@ Configuring Queryable Encryption
11
13
:ref: `This table <manual:qe-compatibility-reference >` shows which MongoDB
12
14
server products support which Queryable Encryption mechanisms.
13
15
14
- .. _server-side-queryable-encryption :
15
-
16
16
Configuring Queryable Encryption in Django is similar to
17
17
:doc: `manual:core/queryable-encryption/quick-start ` but with some additional
18
18
steps required for Django.
@@ -23,20 +23,10 @@ Prerequisites
23
23
In addition to :doc: `installing </intro/install >` and :doc: `configuring
24
24
</intro/configure>` Django MongoDB Backend, you will need to install some
25
25
additional packages to use Queryable Encryption. This can be done with the
26
- optional dependency ``encryption `` in the ``django-mongodb-backend `` package.
26
+ optional dependency ``encryption `` in the ``django-mongodb-backend `` package::
27
27
28
28
pip install django-mongodb-backend[encryption]
29
29
30
- .. _server-side-queryable-encryption-settings :
31
-
32
- Server-side Queryable Encryption
33
- --------------------------------
34
-
35
- Queryable Encryption is considered "server-side" when the encrypted fields map
36
- is not known at the time of connection to the database and this approach allows
37
- you to begin developing applications without needing to define the encrypted
38
- fields map at the time of connection to the database.
39
-
40
30
Settings
41
31
--------
42
32
@@ -88,9 +78,6 @@ Here's how to set it up in your Django settings::
88
78
89
79
DATABASE_ROUTERS = [EncryptedRouter()]
90
80
91
- You are now ready to use server-side :doc: `Queryable Encryption
92
- </topics/queryable-encryption>`.
93
-
94
81
.. admonition :: KMS providers and credentials
95
82
96
83
The above example uses a local KMS provider with a randomly generated
@@ -105,21 +92,11 @@ You are now ready to use server-side :doc:`Queryable Encryption
105
92
You can also refer to the `Python Queryable Encryption Tutorial
106
93
<https://github.com/mongodb/docs/tree/adad2b1ae41ec81a6e5682842850030813adc1e5/source/includes/qe-tutorials/python> `_.
107
94
108
- .. _client-side-queryable-encryption :
109
-
110
- Client-side Queryable Encryption
111
- --------------------------------
112
-
113
- Queryable Encryption is considered "client-side" when the encrypted fields map
114
- is known at the time of connection to the database. This approach can be used
115
- when you have finished development and you have a fixed set of encrypted fields
116
- that you want to use in your production environment.
117
-
118
95
Encrypted fields map
119
96
~~~~~~~~~~~~~~~~~~~~
120
97
121
98
In addition to the :ref: `settings described in the how-to guide
122
- <server-side- queryable-encryption-settings>` you will need to provide a
99
+ <queryable-encryption-settings>` you will need to provide a
123
100
``encrypted_fields_map `` to the ``AutoEncryptionOpts ``.
124
101
125
102
You can use the :djadmin: `showencryptedfieldsmap ` management command to generate
@@ -145,14 +122,16 @@ facilitate Queryable Encryption operations.
145
122
Settings
146
123
~~~~~~~~
147
124
148
- Now include the generated schema map in your Django settings::
125
+ Now include the crypt shared library path and generated schema map in your
126
+ Django settings::
149
127
150
128
…
151
129
DATABASES["encrypted"] = {
152
130
…
153
131
"OPTIONS": {
154
132
"auto_encryption_opts": AutoEncryptionOpts(
155
133
…
134
+ crypt_shared_lib_path="/path/to/mongo_crypt_v1",
156
135
encrypted_fields_map = {
157
136
"encryption__patientrecord": {
158
137
"fields": [
@@ -172,5 +151,5 @@ Now include the generated schema map in your Django settings::
172
151
…
173
152
}
174
153
175
- You are now ready to use client-side :doc: `Queryable Encryption
154
+ You are now ready to use :doc: `Queryable Encryption
176
155
</topics/queryable-encryption>`.
0 commit comments