[DRIVERS-2451] Test mongocryptd is not spawned when shared library is loaded Created: 27/Sep/22  Updated: 19/May/23  Resolved: 19/May/23

Status: Closed
Project: Drivers
Component/s: Client Side Encryption
Fix Version/s: None

Type: Task Priority: Unknown
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to PHPLIB-1031 Test mongocryptd is not spawned when ... Closed
split to CDRIVER-4515 Test mongocryptd is not spawned when ... Closed
split to CSHARP-4386 Test mongocryptd is not spawned when ... Closed
split to CXX-2608 Test mongocryptd is not spawned when ... Closed
split to GODRIVER-2614 Test mongocryptd is not spawned when ... Closed
split to MOTOR-1060 Test mongocryptd is not spawned when ... Closed
split to NODE-4772 Test mongocryptd is not spawned when ... Closed
split to PYTHON-3492 Test mongocryptd is not spawned when ... Closed
split to RUBY-3168 Test mongocryptd is not spawned when ... Closed
split to RUST-1528 Test mongocryptd is not spawned when ... Closed
split to JAVA-4794 Test mongocryptd is not spawned when ... Closed
Related
is related to DRIVERS-2449 Do not connect to mongocryptd if shar... Implementing
Driver Changes: Needed
Quarter: FY23Q4, FY24Q1
Downstream Changes Summary:

Implement the prose test specified here: https://github.com/mongodb/specifications/commit/33a03f2eae1f479165fbde97993afb18241204af

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4515 Fixed 1.24.0
CXX-2608 Done 3.8.0
CSHARP-4386 Fixed 2.19.0
GODRIVER-2614 Fixed 1.12.0, 1.12.0-alpha1
JAVA-4794 Done 4.10.0
NODE-4772 Fixed 5.5.0
MOTOR-1060 Duplicate
PYTHON-3492 Fixed 4.4
PHPLIB-1031 Fixed 1.16.0
RUBY-3168 Fixed 2.19.0
RUST-1528 Fixed 2.4.0
SWIFT-1674 Won't Do

 Description   

Summary

Test mongocryptd is not spawned when shared library is loaded

Motivation

The CSFLE specification expects mongocryptd not to be spawned if the crypt_shared library is available.

See Spawning mongocryptd:

If the following conditions are met:

  • The user's ``MongoClient`` is configured for client-side encryption (i.e.
    `bypassAutoEncryption` is not |false|)
  • *AND* the user has not disabled `mongocryptd` spawning (i.e. by setting
    `extraOptions.mongocryptdBypassSpawn` to |true|),
  • *AND* the crypt_shared_ library is unavailable (Refer:
    `Detecting crypt_shared Availability`_),
  • *AND* the |opt-crypt_shared-required| option is |false|.

*then* ``mongocryptd`` MUST be spawned by the driver.

There is no prose test to check that mongocryptd is not spawned when the crypt_shared library is available.

Who is the affected end user?

Users of CSFLE with automatic encryption.

How likely is it that this problem or use case will occur?

Likely. Reviewing code suggests there is a bug in some drivers.

If the problem does occur, what are the consequences and how severe are they?

If a driver is incorrectly attempting to spawn mongocryptd. This may result in an error configuring a MongoClient with automatic encryption. mongocryptd may not be available to spawn.

Is this issue urgent?

No.

Is this ticket only for tests?

Yes.



 Comments   
Comment by Githook User [ 13/Nov/22 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: DRIVERS-2451 add bypass spawn test with shared lib (#1342)
Branch: master
https://github.com/mongodb/specifications/commit/33a03f2eae1f479165fbde97993afb18241204af

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