301 lines
8.1 KiB
JSON
301 lines
8.1 KiB
JSON
{
|
|
"runOn": [
|
|
{
|
|
"minServerVersion": "7.0.0",
|
|
"topology": [
|
|
"replicaset",
|
|
"sharded",
|
|
"load-balanced"
|
|
]
|
|
}
|
|
],
|
|
"database_name": "default",
|
|
"collection_name": "default",
|
|
"data": [],
|
|
"json_schema": {
|
|
"properties": {},
|
|
"bsonType": "object"
|
|
},
|
|
"encrypted_fields": {
|
|
"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"
|
|
}
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"description": "encryptedFields is preferred over jsonSchema",
|
|
"clientOptions": {
|
|
"autoEncryptOpts": {
|
|
"kmsProviders": {
|
|
"local": {
|
|
"key": {
|
|
"$binary": {
|
|
"base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk",
|
|
"subType": "00"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operations": [
|
|
{
|
|
"name": "insertOne",
|
|
"arguments": {
|
|
"document": {
|
|
"_id": 1,
|
|
"encryptedIndexed": "123"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "find",
|
|
"arguments": {
|
|
"filter": {
|
|
"encryptedIndexed": "123"
|
|
}
|
|
},
|
|
"result": [
|
|
{
|
|
"_id": 1,
|
|
"encryptedIndexed": "123"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expectations": [
|
|
{
|
|
"command_started_event": {
|
|
"command": {
|
|
"listCollections": 1,
|
|
"filter": {
|
|
"name": "default"
|
|
}
|
|
},
|
|
"command_name": "listCollections"
|
|
}
|
|
},
|
|
{
|
|
"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": {
|
|
"insert": "default",
|
|
"documents": [
|
|
{
|
|
"_id": 1,
|
|
"encryptedIndexed": {
|
|
"$$type": "binData"
|
|
}
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"command_name": "insert"
|
|
}
|
|
},
|
|
{
|
|
"command_started_event": {
|
|
"command": {
|
|
"find": "default",
|
|
"filter": {
|
|
"encryptedIndexed": {
|
|
"$eq": {
|
|
"$binary": {
|
|
"base64": "DIkAAAAFZAAgAAAAAPGmZcUzdE/FPILvRSyAScGvZparGI2y9rJ/vSBxgCujBXMAIAAAAACi1RjmndKqgnXy7xb22RzUbnZl1sOZRXPOC0KcJkAxmQVsACAAAAAApJtKPW4+o9B7gAynNLL26jtlB4+hq5TXResijcYet8USY20AAAAAAAAAAAAA",
|
|
"subType": "06"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"command_name": "find"
|
|
}
|
|
}
|
|
],
|
|
"outcome": {
|
|
"collection": {
|
|
"data": [
|
|
{
|
|
"_id": 1,
|
|
"encryptedIndexed": {
|
|
"$$type": "binData"
|
|
},
|
|
"__safeContent__": [
|
|
{
|
|
"$binary": {
|
|
"base64": "31eCYlbQoVboc5zwC8IoyJVSkag9PxREka8dkmbXJeY=",
|
|
"subType": "00"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|