Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40354

mongocryptd should echo back all fields in command, and none that aren't

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • Query 2019-05-06, Query 2019-05-20

      mongodcryptd should respect whatever fields the caller passes to it, and echo them back unchanged (except for jsonSchema field and the markings, of course), and should not add any additional fields. This gives drivers the most flexibility in terms of the design space for implementation of FLE. Some drivers may be invoking mongocryptd at a layer above where $db and other common fields are added, and some below. By echoing back what the driver provides, it will allow either design to work seamlessly.

      Current behavior:

      MongoDB Enterprise > db.runCommand({insert : "test", documents : [{}], jsonSchema : {properties : {}}})
      {
      	"hasEncryptionPlaceholders" : false,
      	"result" : {
      		"insert" : "test",
      		"bypassDocumentValidation" : false,
      		"ordered" : true,
      		"documents" : [
      			{
      
      			}
      		],
      		"lsid" : {
      			"id" : UUID("a990143c-585b-4be0-ab45-93427f476d12")
      		},
      		"$db" : "test"
      	},
      	"ok" : 1
      }
      

      Expected behavior:

      MongoDB Enterprise > db.runCommand({insert : "test", documents : [{}], jsonSchema : {properties : {}}})
      {
      	"hasEncryptionPlaceholders" : false,
      	"result" : {
      		"insert" : "test",
      		"documents" : [
      			{
      			}
      		]
      	},
      	"ok" : 1
      }
      

            Assignee:
            ted.tuckman@mongodb.com Ted Tuckman
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: