@@ -27,11 +27,12 @@ Configuring the ``DATABASES`` setting
27
27
=====================================
28
28
29
29
In addition to :ref: `configuring-databases-setting `, you must also configure an
30
- encrypted database in your `` DATABASES ` ` setting.
30
+ encrypted database in your :setting: ` django: DATABASES ` setting.
31
31
32
32
This database will be used to store encrypted fields in your models. The
33
33
following example shows how to configure an encrypted database using the
34
- ``AutoEncryptionOpts `` from the ``pymongo.encryption_options `` module.
34
+ :class: `pymongo.encryption_options.AutoEncryptionOpts ` from the
35
+ :mod: `pymongo.encryption_options ` module.
35
36
36
37
This example uses a local KMS provider and a key vault namespace for storing
37
38
encryption keys.
@@ -60,9 +61,10 @@ encryption keys.
60
61
Configuring the ``DATABASE_ROUTERS `` setting
61
62
============================================
62
63
63
- Similar to :ref: `configuring-database-routers-setting ` for using embedded
64
- models, to use Queryable Encryption, you must also configure the
65
- ``DATABASE_ROUTERS `` setting to route queries to the encrypted database.
64
+ Similar to :ref: `configuring-database-routers-setting ` for using :doc: `embedded
65
+ models </topics/embedded-models>`, to use Queryable Encryption you must also
66
+ configure the :setting: `django:DATABASE_ROUTERS ` setting to route queries to the
67
+ encrypted database.
66
68
67
69
This is done by adding a custom router that routes queries to the encrypted
68
70
database based on the model's metadata. The following example shows how to
@@ -94,3 +96,25 @@ configure a custom router for Queryable Encryption:
94
96
95
97
Configuring KMS Providers
96
98
=========================
99
+
100
+ To use Queryable Encryption, you must configure a Key Management Service (KMS)
101
+ provider. The KMS provider is responsible for managing the encryption keys used
102
+ to encrypt and decrypt data. The following table summarizes the available KMS
103
+ provider options and how to configure them:
104
+
105
+ +-------------------------------------------------------------------------+---------------------------------------+
106
+ | :setting: `KMS_CREDENTIALS <DATABASE-KMS-CREDENTIALS> ` | A dictionary of Key Management |
107
+ | | Service (KMS) credentials |
108
+ | | configured in the |
109
+ | | :setting: `django:DATABASES ` |
110
+ | | setting. |
111
+ +-------------------------------------------------------------------------+---------------------------------------+
112
+ | :class: `kms_providers <pymongo.encryption_options.AutoEncryptionOpts> ` | Map of KMS provider credentials and |
113
+ | | options. The ``kms_providers `` map |
114
+ | | values differ by provider and are |
115
+ | | required to access KMS services. |
116
+ +-------------------------------------------------------------------------+---------------------------------------+
117
+ | ``kms_provider `` | A single KMS provider name |
118
+ | | configured in your custom database |
119
+ | | router. |
120
+ +-------------------------------------------------------------------------+---------------------------------------+
0 commit comments