File tree Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -152,15 +152,19 @@ Example of KMS configuration with AWS KMS:
152152
153153.. code-block :: python
154154
155- from django_mongodb_backend import parse_uri
156155 from pymongo.encryption_options import AutoEncryptionOpts
157156
158157 DATABASES = {
159- " encrypted" : parse_uri(
160- DATABASE_URL ,
161- options = {
158+ " encrypted" : {
159+ " ENGINE" : " django_mongodb_backend" ,
160+ " HOST" : " mongodb+srv://cluster0.example.mongodb.net" ,
161+ " NAME" : " encrypted" ,
162+ " USER" : " my_user" ,
163+ " PASSWORD" : " my_password" ,
164+ " PORT" : 27017 ,
165+ " OPTIONS" : {
162166 " auto_encryption_opts" : AutoEncryptionOpts(
163- key_vault_namespace = " keyvault .keyvault" ,
167+ key_vault_namespace = " encrypted .keyvault" ,
164168 kms_providers = {
165169 " aws" : {
166170 " accessKeyId" : " your-access-key-id" ,
@@ -169,14 +173,12 @@ Example of KMS configuration with AWS KMS:
169173 },
170174 )
171175 },
172- db_name = " encrypted" ,
173- ),
174- }
175-
176- DATABASES [" encrypted" ][" KMS_CREDENTIALS" ] = {
177- " aws" : {
178- " key" : os.getenv(" AWS_KEY_ARN" , " " ),
179- " region" : os.getenv(" AWS_KEY_REGION" , " " ),
176+ " KMS_CREDENTIALS" : {
177+ " aws" : {
178+ " key" : os.getenv(" AWS_KEY_ARN" , " " ),
179+ " region" : os.getenv(" AWS_KEY_REGION" , " " ),
180+ },
181+ },
180182 },
181183 }
182184
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Available commands
1717``showencryptedfieldsmap ``
1818--------------------------
1919
20- .. versionadded :: 5.2.2
20+ .. versionadded :: 5.2.3
2121
2222.. django-admin :: showencryptedfieldsmap
2323
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Django MongoDB Backend supports :doc:`manual:core/queryable-encryption`.
99See :doc: `/howto/queryable-encryption ` for more information on how to use
1010Queryable Encryption with Django MongoDB Backend.
1111
12- See the :doc: `Queryable Encryption topic < /topics/queryable-encryption >` for
12+ See the :doc: `/topics/queryable-encryption ` topic guide for
1313more information on developing applications with Queryable Encryption.
1414
1515The following fields are supported by Django MongoDB Backend for use with
You can’t perform that action at this time.
0 commit comments