-
Notifications
You must be signed in to change notification settings - Fork 1.8k
test(NODE-4271): sync fle2 api spec tests #3273
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
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
67c8a01
test(NODE-4271): sync fle2 api spec tests
durran f0e67a2
fix(NODE-4271): drop main collection first
durran b396c84
Revert "fix(NODE-4271): drop main collection first"
durran e245a54
test(NODE-4271): update to fix create collection tests
durran 230a16f
Revert "test(NODE-4271): test create createIndexes and collmod"
durran d75ef0f
test(NODE-4271): filter fle ejson parsing
durran b0579ca
test(NODE-4271): bring back the removed specs
durran 90d2531
test(NODE-4271): fix casting errors in tests
durran d0861e6
test(NODE-4271): never promote in spec tests
durran 7f130f7
test(NODE-4271): check message not code
durran 0b44b78
test(NODE-4271): only dont promote longs
durran baa78d1
test(NODE-4271): use relaxed in command shapes
durran 7a75232
test(NODE-4271): only relax not on fle2
durran 32e2b92
test(NODE-4271): dont promote longs in shared client
durran 7beebc3
test(NODE-4271): use requiresCSFLE
durran f4a9ced
test(NODE-4271): use correct options
durran f6ac183
test(NODE-4271): pass test context through
durran 3bb305e
chore(NODE-4271): fix lint errors
durran ca05815
test(NODE-4271): skip getmore encrypted test
durran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
1,032 changes: 1,002 additions & 30 deletions
1,032
test/spec/client-side-encryption/tests/README.rst
Large diffs are not rendered by default.
Oops, something went wrong.
289 changes: 289 additions & 0 deletions
289
test/spec/client-side-encryption/tests/fle2-BypassQueryAnalysis.json
This file contains hidden or 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,289 @@ | ||
{ | ||
"runOn": [ | ||
{ | ||
"minServerVersion": "6.0.0", | ||
"topology": [ | ||
"replicaset", | ||
"sharded" | ||
] | ||
} | ||
], | ||
"database_name": "default", | ||
"collection_name": "default", | ||
"data": [], | ||
"encrypted_fields": { | ||
"escCollection": "enxcol_.default.esc", | ||
"eccCollection": "enxcol_.default.ecc", | ||
"ecocCollection": "enxcol_.default.ecoc", | ||
"fields": [ | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedIndexed", | ||
"bsonType": "string", | ||
"queries": { | ||
"queryType": "equality", | ||
"contention": { | ||
"$numberLong": "0" | ||
} | ||
} | ||
}, | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "q83vqxI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedUnindexed", | ||
"bsonType": "string" | ||
} | ||
] | ||
}, | ||
"key_vault_data": [ | ||
{ | ||
"_id": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"keyMaterial": { | ||
"$binary": { | ||
"base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", | ||
"subType": "00" | ||
} | ||
}, | ||
"creationDate": { | ||
"$date": { | ||
"$numberLong": "1648914851981" | ||
} | ||
}, | ||
"updateDate": { | ||
"$date": { | ||
"$numberLong": "1648914851981" | ||
} | ||
}, | ||
"status": { | ||
"$numberInt": "0" | ||
}, | ||
"masterKey": { | ||
"provider": "local" | ||
} | ||
}, | ||
{ | ||
"_id": { | ||
"$binary": { | ||
"base64": "q83vqxI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"keyMaterial": { | ||
"$binary": { | ||
"base64": "HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==", | ||
"subType": "00" | ||
} | ||
}, | ||
"creationDate": { | ||
"$date": { | ||
"$numberLong": "1648914851981" | ||
} | ||
}, | ||
"updateDate": { | ||
"$date": { | ||
"$numberLong": "1648914851981" | ||
} | ||
}, | ||
"status": { | ||
"$numberInt": "0" | ||
}, | ||
"masterKey": { | ||
"provider": "local" | ||
} | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "BypassQueryAnalysis decrypts", | ||
"clientOptions": { | ||
"autoEncryptOpts": { | ||
"kmsProviders": { | ||
"local": { | ||
"key": { | ||
"$binary": { | ||
"base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", | ||
"subType": "00" | ||
} | ||
} | ||
} | ||
}, | ||
"bypassQueryAnalysis": true | ||
} | ||
}, | ||
"operations": [ | ||
{ | ||
"name": "insertOne", | ||
"arguments": { | ||
"document": { | ||
"_id": 1, | ||
"encryptedIndexed": { | ||
"$binary": { | ||
"base64": "BHEBAAAFZAAgAAAAAHb62aV7+mqmaGcotPLdG3KP7S8diFwWMLM/5rYtqLrEBXMAIAAAAAAVJ6OWHRv3OtCozHpt3ZzfBhaxZirLv3B+G8PuaaO4EgVjACAAAAAAsZXWOWA+UiCBbrJNB6bHflB/cn7pWSvwWN2jw4FPeIUFcABQAAAAAMdD1nV2nqeI1eXEQNskDflCy8I7/HvvqDKJ6XxjhrPQWdLqjz+8GosGUsB7A8ee/uG9/guENuL25XD+Fxxkv1LLXtavHOlLF7iW0u9yabqqBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AE0AAAAAq83vqxI0mHYSNBI0VniQEkzZZBBDgeZh+h+gXEmOrSFtVvkUcnHWj/rfPW7iJ0G3UJ8zpuBmUM/VjOMJCY4+eDqdTiPIwX+/vNXegc8FZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsAA==", | ||
"subType": "06" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "find", | ||
"arguments": { | ||
"filter": { | ||
"_id": 1 | ||
} | ||
}, | ||
"result": [ | ||
{ | ||
"_id": 1, | ||
"encryptedIndexed": "value123" | ||
} | ||
] | ||
} | ||
], | ||
"expectations": [ | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"listCollections": 1, | ||
"filter": { | ||
"name": "default" | ||
} | ||
}, | ||
"command_name": "listCollections" | ||
} | ||
}, | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"insert": "default", | ||
"documents": [ | ||
{ | ||
"_id": 1, | ||
"encryptedIndexed": { | ||
"$binary": { | ||
"base64": "BHEBAAAFZAAgAAAAAHb62aV7+mqmaGcotPLdG3KP7S8diFwWMLM/5rYtqLrEBXMAIAAAAAAVJ6OWHRv3OtCozHpt3ZzfBhaxZirLv3B+G8PuaaO4EgVjACAAAAAAsZXWOWA+UiCBbrJNB6bHflB/cn7pWSvwWN2jw4FPeIUFcABQAAAAAMdD1nV2nqeI1eXEQNskDflCy8I7/HvvqDKJ6XxjhrPQWdLqjz+8GosGUsB7A8ee/uG9/guENuL25XD+Fxxkv1LLXtavHOlLF7iW0u9yabqqBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AE0AAAAAq83vqxI0mHYSNBI0VniQEkzZZBBDgeZh+h+gXEmOrSFtVvkUcnHWj/rfPW7iJ0G3UJ8zpuBmUM/VjOMJCY4+eDqdTiPIwX+/vNXegc8FZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsAA==", | ||
"subType": "06" | ||
} | ||
} | ||
} | ||
], | ||
"ordered": true | ||
}, | ||
"command_name": "insert" | ||
} | ||
}, | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"find": "default", | ||
"filter": { | ||
"_id": 1 | ||
} | ||
}, | ||
"command_name": "find" | ||
} | ||
}, | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"find": "datakeys", | ||
"filter": { | ||
"$or": [ | ||
{ | ||
"_id": { | ||
"$in": [ | ||
{ | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"keyAltNames": { | ||
"$in": [] | ||
} | ||
} | ||
] | ||
}, | ||
"$db": "keyvault", | ||
"readConcern": { | ||
"level": "majority" | ||
} | ||
}, | ||
"command_name": "find" | ||
} | ||
}, | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"find": "datakeys", | ||
"filter": { | ||
"$or": [ | ||
{ | ||
"_id": { | ||
"$in": [ | ||
{ | ||
"$binary": { | ||
"base64": "q83vqxI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"keyAltNames": { | ||
"$in": [] | ||
} | ||
} | ||
] | ||
}, | ||
"$db": "keyvault", | ||
"readConcern": { | ||
"level": "majority" | ||
} | ||
}, | ||
"command_name": "find" | ||
} | ||
} | ||
], | ||
"outcome": { | ||
"collection": { | ||
"data": [ | ||
{ | ||
"_id": 1, | ||
"encryptedIndexed": { | ||
"$$type": "binData" | ||
}, | ||
"__safeContent__": [ | ||
{ | ||
"$binary": { | ||
"base64": "ThpoKfQ8AkOzkFfNC1+9PF0pY2nIzfXvRdxQgjkNbBw=", | ||
"subType": "00" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.