Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* do not create or drop the eccCollection * DRIVERS-2586 do not document `escCollection` and `ecocCollection` options * remove eccCollection from fle2v2-CreateCollection * remove `eccCollection` from `encryptedFields` data files * regenerate fle2v2 tests * remove eccCollection from fle2v2-EncryptedFields-vs-EncryptedFieldsMap * remove eccCollection from fle2v2-Range-WrongType * assert eccCollection is not created * remove incorrect comment * add wire version check and test * remove `escCollection` and `ecocCollection` from test data * regenerate tests * add $$exists to legacy format * add $$exists to tests Assert that state collections names are not sent to server * test encryptedFields is consulted for metadata collection names * change SHOULD to MUST * use YAML anchors for collection names * add comment that ecc collection is no longer created for QEv2 * remove `encryptedFieldsMap with cyclic entries does not loop` * use YAML anchors for encryptedFields * use `null`, not $$exists * Revert "add $$exists to legacy format" This reverts commit 72280f9. * swap order of `base64` and `subType` * remove unnecessary anchor * regenerate fle2v2-CreateCollection-OldServer
- Loading branch information
Showing
125 changed files
with
481 additions
and
1,724 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
source/client-side-encryption/tests/legacy/fle2v2-CreateCollection-OldServer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"runOn": [ | ||
{ | ||
"minServerVersion": "6.0.0", | ||
"maxServerVersion": "6.3.99", | ||
"topology": [ | ||
"replicaset", | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
"database_name": "default", | ||
"collection_name": "default", | ||
"tests": [ | ||
{ | ||
"description": "driver returns an error if creating a QEv2 collection on unsupported server", | ||
"clientOptions": { | ||
"autoEncryptOpts": { | ||
"kmsProviders": { | ||
"aws": {} | ||
}, | ||
"encryptedFieldsMap": { | ||
"default.encryptedCollection": { | ||
"fields": [ | ||
{ | ||
"path": "firstName", | ||
"bsonType": "string", | ||
"keyId": { | ||
"$binary": { | ||
"base64": "AAAAAAAAAAAAAAAAAAAAAA==", | ||
"subType": "04" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"operations": [ | ||
{ | ||
"name": "dropCollection", | ||
"object": "database", | ||
"arguments": { | ||
"collection": "encryptedCollection" | ||
} | ||
}, | ||
{ | ||
"name": "createCollection", | ||
"object": "database", | ||
"arguments": { | ||
"collection": "encryptedCollection" | ||
}, | ||
"result": { | ||
"errorContains": "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption." | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
39 changes: 39 additions & 0 deletions
39
source/client-side-encryption/tests/legacy/fle2v2-CreateCollection-OldServer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Requires libmongocrypt 1.8.0. | ||
runOn: | ||
- minServerVersion: "6.0.0" | ||
maxServerVersion: "6.3.99" | ||
# FLE 2 Encrypted collections are not supported on standalone. | ||
topology: [ "replicaset", "sharded", "load-balanced" ] | ||
|
||
database_name: &database_name "default" | ||
collection_name: &collection_name "default" | ||
|
||
tests: | ||
- description: "driver returns an error if creating a QEv2 collection on unsupported server" | ||
clientOptions: | ||
autoEncryptOpts: | ||
kmsProviders: | ||
aws: {} # Credentials filled in from environment. | ||
encryptedFieldsMap: | ||
default.encryptedCollection: { | ||
"fields": [ | ||
{ | ||
"path": "firstName", | ||
"bsonType": "string", | ||
"keyId": { "$binary": { "base64": "AAAAAAAAAAAAAAAAAAAAAA==", "subType": "04" }} | ||
} | ||
] | ||
} | ||
|
||
operations: | ||
# Do an initial drop to remove collections that may exist from previous test runs. | ||
- name: dropCollection | ||
object: database | ||
arguments: | ||
collection: "encryptedCollection" | ||
- name: createCollection | ||
object: database | ||
arguments: | ||
collection: "encryptedCollection" | ||
result: | ||
errorContains: "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption." |
Oops, something went wrong.