Skip to content

CDRIVER-5901 support auto encryption in unified tests #2004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

mdb-ad
Copy link

@mdb-ad mdb-ad commented May 1, 2025

@mdb-ad mdb-ad force-pushed the unified-tests-only branch from 5ede743 to 488c3e5 Compare May 5, 2025 06:01
@mdb-ad mdb-ad force-pushed the unified-tests-only branch from 488c3e5 to da08915 Compare May 5, 2025 06:06
@mdb-ad mdb-ad requested a review from kevinAlbs May 5, 2025 06:08
@mdb-ad mdb-ad marked this pull request as ready for review May 16, 2025 22:58
@mdb-ad mdb-ad requested a review from a team as a code owner May 16, 2025 22:58
@mdb-ad mdb-ad requested review from eramongodb and kevinAlbs May 16, 2025 22:58
Comment on lines +14 to +22
"autoEncryptOpts": {
"keyVaultNamespace": "keyvault.datakeys",
"kmsProviders": {
"aws": {}
},
"extraOptions": {
"mongocryptdBypassSpawn": true
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

For future reference, what version of the specifications repository (commit) are these files synced with, and why? There are differences between the files in this PR compared to the latest commit, which has several fields reordered + some other significant changes (e.g. addition of $sessionToken, removal of object: "unencryptedColl", etc.).

@@ -637,7 +641,7 @@ check_schema_version (test_file_t *test_file)
// 1.21 is partially supported (expectedError.writeErrors and expectedError.writeConcernErrors)
// 1.22 is partially supported (keyExpirationMS in client encryption options)
semver_t schema_version;
semver_parse ("1.22", &schema_version);
semver_parse ("1.23", &schema_version);
Copy link
Contributor

Choose a reason for hiding this comment

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

Recommend updating the comment above to include 1.23 compatibility (full? with exceptions?).

@@ -953,6 +963,51 @@ test_setup_initial_data (test_t *test, bson_error_t *error)
memset (error, 0, sizeof (bson_error_t));
}

// Also drop `enxcol_.<coll>.esc` and `enxcol_.<coll>.ecoc` in case the collection will be used for QE.
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these series of blocks implementing this part of the CSFLE spec?

  • Drop the collection with name encryptedFields["escCollection"]. If encryptedFields["escCollection"] is not set, use the collection name enxcol_.<collectionName>.esc.
  • Drop the collection with name encryptedFields["ecocCollection"]. If encryptedFields["ecocCollection"] is not set, use the collection name enxcol_.<collectionName>.ecoc.
  • Drop the collection collectionName.

If so, recommend adding a link/reference to this spec (+ is this missing handling of "escCollection"/"ecocCollection"?). If not, recommend elaborating what is meant by "in case the collection will be used for QE" (that is, what is motivating these drop commands?).

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.

3 participants