-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Field Level Encryption
-
None
-
Fully Compatible
-
ALL
-
-
Security 2022-11-14, Security 2022-12-12, Security 2022-12-26, Security 2023-01-09
The "apiVersion", "apiStrict", and "apiDeprecationErrors" fields do not appear to be returned in the results of mongocryptd or the mongo_crypt shared library.
mongocryptd omits "apiStrict" or "apiDeprecationErrors".
mongo_crypt omits "apiVersion", "apiStrict" or "apiDeprecationErrors".
For example, marking up the following with mongo_crypt:
{ "explain": { "find": "default", "filter": {}, "$db": "db" }, "$db": "db", "apiVersion": "1", "apiStrict": "true", "apiDeprecationErrors": true, "jsonSchema": {}, "isRemoteSchema": false }
Results in this output:
{ "hasEncryptionPlaceholders": false, "schemaRequiresEncryption": false, "result": { "explain": { "find": "default", "filter": {} }, "verbosity": "allPlansExecution" } }
"apiVersion", "apiStrict", and "apiDeprecationErrors" is expected in the output.
The output is the same for version mongo_crypt_v1-dev-6.2.0-alpha-336-ga7ba740.
Marking an explain command with mongocryptd does not appear to preserve "apiStrict" or "apiDeprecationErrors" in the output.
// Run against mongocryptd with: mongo --port 27020 explain-with-apiVersion.js var cmd = { "explain": { "find": "default", "filter": {} }, "apiVersion": "1", "apiStrict": false, "apiDeprecationErrors": false, "jsonSchema": {}, "isRemoteSchema": false } var got = db.runCommand(cmd) printjson(got) /* Prints: { "hasEncryptionPlaceholders" : false, "schemaRequiresEncryption" : false, "result" : { "explain" : { "find" : "default", "filter" : { } }, "verbosity" : "allPlansExecution", "apiVersion" : "1" }, "ok" : 1 } */
The output is the same for version 6.1.0-alpha-986-g960265d
- causes
-
PHPLIB-947 Failure in test-requireApiVersion task on MongoDB 6.0 in legacy CSFLE spec test for explain
- Closed
- is related to
-
SERVER-58293 mongocryptd does not include server API fields in explain command response
- Closed
- related to
-
SERVER-77040 Append API version fields to root of explain command
- Closed
-
DRIVERS-2612 Bump minServerVersion for CSFLE deterministic encryption spec test for explain command
- Implementing