-
Notifications
You must be signed in to change notification settings - Fork 454
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
mdb-ad
wants to merge
19
commits into
mongodb:master
Choose a base branch
from
mdb-ad:unified-tests-only
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
da08915
support unified tests
mdb-ad 6cad35f
format
mdb-ad 9f06c63
sync poc-queryable-encryption
mdb-ad 460c143
backout bulkWrite
mdb-ad 0ecf376
Apply suggestions from code review
mdb-ad 2b6fe86
remove skips
mdb-ad f4c4667
exact bson matching
mdb-ad 7f91903
add and use case insensitive matching
mdb-ad ecb725d
remove extra event checking - already covered by events count
mdb-ad 449c885
whitespace
mdb-ad 4093dbe
revise poc-queryable-encryption
mdb-ad 838941e
sync json
mdb-ad 3ad2156
undo most runner changes
mdb-ad 79566ff
Merge branch 'master' into unified-tests-only
mdb-ad 676a8bd
remove migrated tests
mdb-ad 3788a54
Apply suggestions from code review
mdb-ad 3f7a8b0
sync tests
mdb-ad b249b2c
document drop helpers
mdb-ad acf6f22
CSFLE skip logic
mdb-ad 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
322 changes: 322 additions & 0 deletions
322
src/libmongoc/tests/json/client_side_encryption/unified/fle2v2-BypassQueryAnalysis.json
mdb-ad marked this conversation as resolved.
Show resolved
Hide resolved
|
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,322 @@ | ||
{ | ||
"description": "fle2v2-BypassQueryAnalysis", | ||
"schemaVersion": "1.23", | ||
"runOnRequirements": [ | ||
{ | ||
"minServerVersion": "7.0.0", | ||
"serverless": "forbid", | ||
"csfle": true, | ||
"topologies": [ | ||
"replicaset", | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client0", | ||
"autoEncryptOpts": { | ||
"kmsProviders": { | ||
"local": { | ||
"key": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk" | ||
} | ||
}, | ||
"keyVaultNamespace": "keyvault.datakeys", | ||
"bypassQueryAnalysis": true | ||
}, | ||
"observeEvents": [ | ||
"commandStartedEvent" | ||
] | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "encryptedDB", | ||
"client": "client0", | ||
"databaseName": "default" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "encryptedColl", | ||
"database": "encryptedDB", | ||
"collectionName": "default" | ||
} | ||
}, | ||
{ | ||
"client": { | ||
"id": "client1" | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "unencryptedDB", | ||
"client": "client1", | ||
"databaseName": "default" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "unencryptedColl", | ||
"database": "unencryptedDB", | ||
"collectionName": "default" | ||
} | ||
} | ||
], | ||
"initialData": [ | ||
{ | ||
"databaseName": "keyvault", | ||
"collectionName": "datakeys", | ||
"documents": [ | ||
{ | ||
"_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" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"databaseName": "default", | ||
"collectionName": "default", | ||
"documents": [], | ||
"createOptions": { | ||
"encryptedFields": { | ||
"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" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "BypassQueryAnalysis decrypts", | ||
"operations": [ | ||
{ | ||
"object": "encryptedColl", | ||
"name": "insertOne", | ||
"arguments": { | ||
"document": { | ||
"_id": 1, | ||
"encryptedIndexed": { | ||
"$binary": { | ||
"base64": "C18BAAAFZAAgAAAAANnt+eLTkv4GdDPl8IAfJOvTzArOgFJQ2S/DcLza4W0DBXMAIAAAAAD2u+omZme3P2gBPehMQyQHQ153tPN1+z7bksYA9jKTpAVwADAAAAAAUnCOQqIvmR65YKyYnsiVfVrg9hwUVO3RhhKExo3RWOzgaS0QdsBL5xKFS0JhZSoWBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAEjRWeBI0mHYSNBI0VniQEpQbp/ZJpWBKeDtKLiXb0P2E9wvc0g3f373jnYQYlJquOrlPOoEy3ngsHPJuSUijvWDsrQzqYa349K7G/66qaXEFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsBWwAIAAAAACkm0o9bj6j0HuADKc0svbqO2UHj6GrlNdF6yKNxh63xRJrAAAAAAAAAAAAAA==", | ||
"subType": "06" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"object": "encryptedColl", | ||
"name": "find", | ||
"arguments": { | ||
"filter": { | ||
"_id": 1 | ||
} | ||
}, | ||
"expectResult": [ | ||
{ | ||
"_id": 1, | ||
"encryptedIndexed": "123" | ||
} | ||
] | ||
}, | ||
{ | ||
"object": "unencryptedColl", | ||
"name": "find", | ||
"arguments": { | ||
"filter": {} | ||
}, | ||
"expectResult": [ | ||
{ | ||
"_id": 1, | ||
"encryptedIndexed": { | ||
"$$type": "binData" | ||
}, | ||
"__safeContent__": [ | ||
{ | ||
"$binary": { | ||
"base64": "31eCYlbQoVboc5zwC8IoyJVSkag9PxREka8dkmbXJeY=", | ||
"subType": "00" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"expectEvents": [ | ||
{ | ||
"client": "client0", | ||
"events": [ | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"listCollections": 1, | ||
"filter": { | ||
"name": "default" | ||
} | ||
}, | ||
"commandName": "listCollections" | ||
} | ||
}, | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"insert": "default", | ||
"documents": [ | ||
{ | ||
"_id": 1, | ||
"encryptedIndexed": { | ||
"$binary": { | ||
"base64": "C18BAAAFZAAgAAAAANnt+eLTkv4GdDPl8IAfJOvTzArOgFJQ2S/DcLza4W0DBXMAIAAAAAD2u+omZme3P2gBPehMQyQHQ153tPN1+z7bksYA9jKTpAVwADAAAAAAUnCOQqIvmR65YKyYnsiVfVrg9hwUVO3RhhKExo3RWOzgaS0QdsBL5xKFS0JhZSoWBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAEjRWeBI0mHYSNBI0VniQEpQbp/ZJpWBKeDtKLiXb0P2E9wvc0g3f373jnYQYlJquOrlPOoEy3ngsHPJuSUijvWDsrQzqYa349K7G/66qaXEFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsBWwAIAAAAACkm0o9bj6j0HuADKc0svbqO2UHj6GrlNdF6yKNxh63xRJrAAAAAAAAAAAAAA==", | ||
"subType": "06" | ||
} | ||
} | ||
} | ||
], | ||
"ordered": true, | ||
"encryptionInformation": { | ||
"type": 1, | ||
"schema": { | ||
"default.default": { | ||
"escCollection": "enxcol_.default.esc", | ||
"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" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"commandName": "insert" | ||
} | ||
}, | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"find": "default", | ||
"filter": { | ||
"_id": 1 | ||
} | ||
}, | ||
"commandName": "find" | ||
} | ||
}, | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"find": "datakeys", | ||
"filter": { | ||
"$or": [ | ||
{ | ||
"_id": { | ||
"$in": [ | ||
{ | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"keyAltNames": { | ||
"$in": [] | ||
} | ||
} | ||
] | ||
}, | ||
"$db": "keyvault", | ||
"readConcern": { | ||
"level": "majority" | ||
} | ||
}, | ||
"commandName": "find" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
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.