[DRIVERS-2449] Do not connect to mongocryptd if shared library is loaded Created: 26/Sep/22  Updated: 27/Oct/22

Status: Implementing
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Dmitry Lukyanov (Inactive) Assignee: Dmitry Lukyanov (Inactive)
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to CXX-2578 Do not connect to mongocryptd if shar... Backlog
split to NODE-4663 Do not connect to mongocryptd if shar... Backlog
split to PHPLIB-988 Do not connect to mongocryptd if shar... Blocked
split to CDRIVER-4480 Do not connect to mongocryptd if shar... Closed
split to CSHARP-4335 Do not connect to mongocryptd if shar... Closed
split to GODRIVER-2559 Do not connect to mongocryptd if shar... Closed
split to JAVA-4741 Do not connect to mongocryptd if shar... Closed
split to MOTOR-1034 Do not connect to mongocryptd if shar... Closed
split to PYTHON-3446 Do not connect to mongocryptd if shar... Closed
split to RUBY-3133 Do not connect to mongocryptd if shar... Closed
split to RUST-1479 Do not connect to mongocryptd if shar... Closed
Related
related to DRIVERS-2451 Test mongocryptd is not spawned when ... Closed
Epic Link: FLE 1.0 Shared Library
Driver Changes: Needed
Server Compat: 5.3
Quarter: FY23Q2
Downstream Changes Summary:

Ensure that a MongoClient for mongocryptd is not created when shared library is in use

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4480 Fixed 1.24.0
CXX-2578 Backlog
CSHARP-4335 Fixed 2.19.0
GODRIVER-2559 Fixed 1.12.0, 1.12.0-alpha1
JAVA-4741 Done 4.10.0
NODE-4663 Backlog
MOTOR-1034 Duplicate
PYTHON-3446 Done 4.4
PHPLIB-988 Blocked
RUBY-3133 Fixed 2.19.0
RUST-1479 Fixed 2.4.0
SWIFT-1640 Duplicate

 Description   

Summary

Do not connect to mongocryptd if shared library is loaded

Motivation

Successfully loading shared library implicitly assumed that MongoClient must not be created for mongocryptd, now this statement is explicit.

How does this affect the end user?

If a driver spawns a MongoClient for mongocryptd when a shared library is in place, this client will be no-op if mongocryptd is available and will generate hidden SDAM exceptions in another case.

Is this issue urgent?

Nothing is on fire, but better to check this behavior to avoid confusions like why I see mongocryptd exceptions/calls when I use shared library

Is this ticket only for tests?

no



 Comments   
Comment by Githook User [ 27/Oct/22 ]

Author:

{'name': 'Dmitry Lukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}

Message: DRIVERS-2449 Omit mongocryptd client (#1330)
Branch: master
https://github.com/mongodb/specifications/commit/09f1d51d549c141c310055e6d6802bc9e297258d

Comment by Kevin Albertson [ 27/Sep/22 ]

DRIVERS-2451 proposes a separate test: that mongocryptd is not spawned when shared library is loaded.

Comment by Dmitry Lukyanov (Inactive) [ 27/Sep/22 ]

what do you propose to change about

jeff.yemin@mongodb.com, there is a linked PR with proposal.

but also that a driver should not try to connect to mongocrpytd (whether auto-spawned or not)

yes, you're right.
In c# solution, I simply made a MongoClient for mongocryptd lazy. I guess something similar can be done for other drivers.

Also, can you think of a way to test this behavior?

I can think only about unit tests with reflection for now.
cc: kevin.albertson@mongodb.com

Comment by Jeffrey Yemin [ 27/Sep/22 ]

Also, can you think of a way to test this behavior? 

Comment by Jeffrey Yemin [ 27/Sep/22 ]

dmitry.lukyanov@mongodb.com what do you propose to change about https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#mongocryptd?  That not only should mongocryptd should not be spawned when the shared lib is required or available, but also that a driver should not try to connect to mongocrpytd (whether auto-spawned or not)?

Generated at Thu Feb 08 08:25:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.