15
15
"""Options to configure client side encryption."""
16
16
17
17
import copy
18
- import socket
19
18
20
19
try :
21
20
import pymongocrypt
@@ -32,7 +31,7 @@ class AutoEncryptionOpts(object):
32
31
def __init__ (self , kms_providers , key_vault_namespace ,
33
32
key_vault_client = None , schema_map = None ,
34
33
bypass_auto_encryption = False ,
35
- mongocryptd_uri = None ,
34
+ mongocryptd_uri = 'mongodb://localhost:27020' ,
36
35
mongocryptd_bypass_spawn = False ,
37
36
mongocryptd_spawn_path = 'mongocryptd' ,
38
37
mongocryptd_spawn_args = None ):
@@ -90,8 +89,7 @@ def __init__(self, kms_providers, key_vault_namespace,
90
89
enabled. Defaults to ``False``.
91
90
- `mongocryptd_uri` (optional): The MongoDB URI used to connect
92
91
to the *local* mongocryptd process. Defaults to
93
- ``"mongodb://%2Ftmp%2Fmongocryptd.sock"`` if domain sockets are
94
- available or ``"mongodb://localhost:27020"`` otherwise.
92
+ ``'mongodb://localhost:27020'``.
95
93
- `mongocryptd_bypass_spawn` (optional): If ``True``, the encrypted
96
94
MongoClient will not attempt to spawn the mongocryptd process.
97
95
Defaults to ``False``.
@@ -117,11 +115,6 @@ def __init__(self, kms_providers, key_vault_namespace,
117
115
self ._key_vault_client = key_vault_client
118
116
self ._schema_map = schema_map
119
117
self ._bypass_auto_encryption = bypass_auto_encryption
120
- if mongocryptd_uri is None :
121
- if hasattr (socket , 'AF_UNIX' ):
122
- mongocryptd_uri = 'mongodb://%2Ftmp%2Fmongocryptd.sock'
123
- else :
124
- mongocryptd_uri = 'mongodb://localhost:27020'
125
118
self ._mongocryptd_uri = mongocryptd_uri
126
119
self ._mongocryptd_bypass_spawn = mongocryptd_bypass_spawn
127
120
self ._mongocryptd_spawn_path = mongocryptd_spawn_path
0 commit comments