Skip to content

Commit 3b472f2

Browse files
committed
Update encrypted database settings for actions
1 parent 24c86e1 commit 3b472f2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/mongodb_settings.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22

3+
from pymongo.encryption import AutoEncryptionOpts
34
from pymongo.uri_parser import parse_uri
45

56
if mongodb_uri := os.getenv("MONGODB_URI"):
@@ -29,7 +30,18 @@
2930
"NAME": "djangotests-other",
3031
"OPTIONS": {"directConnection": True},
3132
},
32-
"encrypted": {},
33+
"encrypted": {
34+
"ENGINE": "django_mongodb_backend",
35+
"NAME": "djangotests-encrypted",
36+
"OPTIONS": {
37+
"auto_encryption_opts": AutoEncryptionOpts(
38+
key_vault_namespace="encrypted.keyvault",
39+
kms_providers={
40+
"local": {"key": os.urandom(96)},
41+
},
42+
)
43+
},
44+
},
3345
}
3446

3547

0 commit comments

Comments
 (0)