db.runCommand({create: "foo", encryptedFields: {fields: []}}) will apply the default values for escCollection, ecocCollection. The default values are included in the response to listCollections. This results in the escCollection and ecocCollection being present in the outgoing encryptionInformation. See example with mongosh.
The C driver match logic currently permits all extra unmatched fields in the actual event. Tests were verified locally with a modified version of the C driver to prohibit extra fields. Tests were verified on Evergreen with an unmodified C driver: https://spruce.mongodb.com/version/643f19ade3c33120b01ba291
The YAML extend << was used to add escCollection and ecocCollection to the encrypted_fields reference. This required changing some JSON command_started_events to YAML.
Please complete the following before merging:
[ ] Update changelog.Not applicable. Test changes only
[x] Make sure there are generated JSON files from the YAML test files.
[x] Test changes in at least one language driver.
[ ] Test these changes against all server versions and topologies (including standalone, replica set, sharded clusters, and serverless).Tested against replica set and standalone. C driver currently does not test CSFLE/QE with sharded cluster or serverless
Summary
escCollection
andecocCollection
to the outgoingencryptionInformation
incommand_started_event
.ordered: true
toupdate
anddelete
incommand_started_event
.This PR is a follow-up fix to https://github.com/mongodb/specifications/pull/1396
Background & motivation
db.runCommand({create: "foo", encryptedFields: {fields: []}})
will apply the default values forescCollection
,ecocCollection
. The default values are included in the response tolistCollections
. This results in theescCollection
andecocCollection
being present in the outgoingencryptionInformation
. See example with mongosh.The C driver match logic currently permits all extra unmatched fields in the actual event. Tests were verified locally with a modified version of the C driver to prohibit extra fields. Tests were verified on Evergreen with an unmodified C driver: https://spruce.mongodb.com/version/643f19ade3c33120b01ba291
The YAML extend << was used to add
escCollection
andecocCollection
to theencrypted_fields
reference. This required changing some JSONcommand_started_events
to YAML.Please complete the following before merging:
[ ] Update changelog.Not applicable. Test changes only[ ] Test these changes against all server versions and topologies (including standalone, replica set, sharded clusters, and serverless).Tested against replica set and standalone. C driver currently does not test CSFLE/QE with sharded cluster or serverless