DRIVERS-3547: Explicit Encryption Case 2 recreates collection with contention: 10#1952
DRIVERS-3547: Explicit Encryption Case 2 recreates collection with contention: 10#1952rozza wants to merge 5 commits into
Conversation
…ntention: 10 Case 2 uses contentionFactor: 10 but the shared Test Setup creates db.explicit_encryption with contention: 0. Servers implementing SERVER-91887 now reject payloads whose contentionFactor exceeds the collection's configured contention. Fix by dropping and recreating the collection with contention: 10 at the start of Case 2, matching the Python driver fix in PYTHON-5882.
Servers implementing SERVER-91887 require find payloads to exactly match the collection's configured contention factor, not just avoid exceeding it. Drop the find with contentionFactor=0 (which the server now rejects) and update the note to accurately describe the server behavior.
kevinAlbs
left a comment
There was a problem hiding this comment.
FYI testing in the C driver revealed more test failures in the explicit encryption prose tests for QE string queries.
Suggest including 17b9c3d in this PR to address all test failures caused by SERVER-91887.
| [ClientEncryptionOpts](#ClientEncryptionOpts) or [AutoEncryptionOpts](#AutoEncryptionOpts). | ||
| 2. Initialize $P$ to an empty [KMSProviders](#kmsproviders) object. | ||
| 3. If $K$ contains an `aws` property, and that property is an empty map: | ||
| 1. Initialize $P$ to an empty [KMSProviders](#kmsproviders) object. |
There was a problem hiding this comment.
Revert unintended numbering changes.
|
|
||
| #### Case 2: can insert encrypted indexed and find with non-zero contention | ||
|
|
||
| > [!NOTE] |
There was a problem hiding this comment.
Rather than requiring the test recreate the collection, suggest adding a new collection to the test setup.
Add a new file: encryptedFields-c10.json as a copy of encryptedFields.json with contention: 10. Add steps to Test Setup:
Load the file
[encryptedFields-c10.json](https://github.com/mongodb/specifications/tree/master/source/client-side-encryption/etc/data/encryptedFields-c10.json)
as `encryptedFields_c10`.
Drop and create the collection `db.explicit_encryption_c10` using `encryptedFields` as an option. See
[FLE 2 CreateCollection() and Collection.Drop()](../client-side-encryption.md#create-collection-helper).This may be more consistent with other tests. This was simpler to implement in the C driver (rewriting nested fields in BSON is lots of boilerplate).
|
C driver implementation with suggested changes: mongodb/mongo-c-driver#2320 |
Co-authored-by: Kevin Albertson <kevin.eric.albertson@gmail.com>
- Use a pre-created db.explicit_encryption_c10 collection (contention: 10) in Test Setup rather than requiring Case 2 to reconstruct collection BSON - Add encryptedFields-c10.json fixture file - Add explicit contention: 0 to encryptedFields-prefix-suffix.json and encryptedFields-substring.json for SERVER-91887 compatibility
Case 2 uses contentionFactor: 10 but the shared Test Setup creates db.explicit_encryption with contention: 0. Servers implementing SERVER-91887 now reject payloads whose contentionFactor exceeds the collection's configured contention. Fix by dropping and recreating the collection with contention: 10 at the start of Case 2, matching the Python driver fix in PYTHON-5882.
Please complete the following before merging: