[SERVER-58293] mongocryptd does not include server API fields in explain command response Created: 06/Jul/21  Updated: 29/Oct/23  Resolved: 11/Aug/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.3, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Mikalai Mazurenka (Inactive) Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-69564 Query analysis omits version API fiel... Closed
related to SERVER-77040 Append API version fields to root of ... Closed
related to SERVER-40354 mongocryptd should echo back all fiel... Closed
is related to CSHARP-3714 Implement missing test from Versioned... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Requested:
v5.0
Sprint: Security 2021-08-23
Participants:

 Description   

mongocryptd does not echo back server API fields for "explain" command:

var findCmd = {
    "find": "default",
    "filter": {
        "encrypted_string": "string1"
    },
    "apiVersion": "1",
    "jsonSchema": {},
    "isRemoteSchema": true
}
var explainCmd = {
    "explain": {
        "find": "default",
        "filter": {
            "encrypted_string": "string1"
        }
    },
    "apiVersion": "1",
    "jsonSchema": {},
    "isRemoteSchema": true
}
print ("output of find:")
printjson (db.runCommand(findCmd))
print ("output of explain:")
printjson (db.runCommand(explainCmd))

Results in:

output of find:
{
        "hasEncryptionPlaceholders" : false,
        "schemaRequiresEncryption" : false,
        "result" : {
                "find" : "default",
                "filter" : {
                        "encrypted_string" : {
                                "$eq" : "string1"
                        }
                },
                "apiVersion" : "1",
                "lsid" : {
                        "id" : UUID("4f77d319-e271-4ab1-8f10-8d830c27b777")
                }
        },
        "ok" : 1
}
output of explain:
{
        "hasEncryptionPlaceholders" : false,
        "schemaRequiresEncryption" : false,
        "result" : {
                "explain" : {
                        "find" : "default",
                        "filter" : {
                                "encrypted_string" : {
                                        "$eq" : "string1"
                                }
                        }
                },
                "verbosity" : "allPlansExecution"
        },
        "ok" : 1
}

The "find" command response contains "apiVersion" field but it's missing from "explain" response.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 19/Aug/21 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-58293 Propagate apiVersion through mongocryptd explain command
Branch: v5.0
https://github.com/10gen/mongo-enterprise-modules/commit/9451038fdb2f0abfffa4096acabc2cb33c791d5c

Comment by Githook User [ 11/Aug/21 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-58293 Propagate apiVersion through mongocryptd explain command
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/58f9003307b0108f72e650b1f210d8a05ef71b60

Generated at Thu Feb 08 05:44:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.