1+ .. _configuring-queryable-encryption :
2+
13================================
24Configuring Queryable Encryption
35================================
@@ -11,8 +13,6 @@ Configuring Queryable Encryption
1113 :ref: `This table <manual:qe-compatibility-reference >` shows which MongoDB
1214 server products support which Queryable Encryption mechanisms.
1315
14- .. _server-side-queryable-encryption :
15-
1616Configuring Queryable Encryption in Django is similar to
1717:doc: `manual:core/queryable-encryption/quick-start ` but with some additional
1818steps required for Django.
@@ -23,20 +23,10 @@ Prerequisites
2323In addition to :doc: `installing </intro/install >` and :doc: `configuring
2424</intro/configure>` Django MongoDB Backend, you will need to install some
2525additional 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::
2727
2828 pip install django-mongodb-backend[encryption]
2929
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-
4030Settings
4131--------
4232
@@ -88,9 +78,6 @@ Here's how to set it up in your Django settings::
8878
8979 DATABASE_ROUTERS = [EncryptedRouter()]
9080
91- You are now ready to use server-side :doc: `Queryable Encryption
92- </topics/queryable-encryption>`.
93-
9481.. admonition :: KMS providers and credentials
9582
9683 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
10592 You can also refer to the `Python Queryable Encryption Tutorial
10693 <https://github.com/mongodb/docs/tree/adad2b1ae41ec81a6e5682842850030813adc1e5/source/includes/qe-tutorials/python> `_.
10794
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-
11895Encrypted fields map
11996~~~~~~~~~~~~~~~~~~~~
12097
12198In 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
123100``encrypted_fields_map `` to the ``AutoEncryptionOpts ``.
124101
125102You can use the :djadmin: `showencryptedfieldsmap ` management command to generate
@@ -145,14 +122,16 @@ facilitate Queryable Encryption operations.
145122Settings
146123~~~~~~~~
147124
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::
149127
150128 …
151129 DATABASES["encrypted"] = {
152130 …
153131 "OPTIONS": {
154132 "auto_encryption_opts": AutoEncryptionOpts(
155133 …
134+ crypt_shared_lib_path="/path/to/mongo_crypt_v1",
156135 encrypted_fields_map = {
157136 "encryption__patientrecord": {
158137 "fields": [
@@ -172,5 +151,5 @@ Now include the generated schema map in your Django settings::
172151 …
173152 }
174153
175- You are now ready to use client-side :doc: `Queryable Encryption
154+ You are now ready to use :doc: `Queryable Encryption
176155</topics/queryable-encryption>`.
0 commit comments