Skip to content

Conversation

kevinAlbs
Copy link
Contributor

@kevinAlbs kevinAlbs commented Apr 18, 2023

Summary

  • Add escCollection and ecocCollection to the outgoing encryptionInformation in command_started_event.
  • Add ordered: true to update and delete in command_started_event.

This PR is a follow-up fix to #1396

Background & motivation

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
  • Make sure there are generated JSON files from the YAML test files.
  • 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

@kevinAlbs kevinAlbs marked this pull request as ready for review April 19, 2023 12:42
@kevinAlbs kevinAlbs requested a review from a team as a code owner April 19, 2023 12:42
@kevinAlbs kevinAlbs requested review from DmitryLukyanov and katcharov and removed request for a team and katcharov April 19, 2023 12:42
Copy link

@DmitryLukyanov DmitryLukyanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevinAlbs kevinAlbs merged commit eb3d882 into mongodb:master Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants