Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,91 @@
}
],
"tests": [
{
"description": "disambiguatedPaths is not present when showExpandedEvents is false/unset",
"runOnRequirements": [
{
"minServerVersion": "6.1.0",
"maxServerVersion": "8.1.99",
"topologies": [
"replicaset",
"load-balanced",
"sharded"
],
"serverless": "forbid"
},
{
"minServerVersion": "8.2.1",
"topologies": [
"replicaset",
"load-balanced",
"sharded"
],
"serverless": "forbid"
}
],
"operations": [
{
"name": "insertOne",
"object": "collection0",
"arguments": {
"document": {
"_id": 1,
"a": {
"1": 1
}
}
}
},
{
"name": "createChangeStream",
"object": "collection0",
"arguments": {
"pipeline": []
},
"saveResultAsEntity": "changeStream0"
},
{
"name": "updateOne",
"object": "collection0",
"arguments": {
"filter": {
"_id": 1
},
"update": {
"$set": {
"a.1": 2
}
}
}
},
{
"name": "iterateUntilDocumentOrError",
"object": "changeStream0",
"expectResult": {
"operationType": "update",
"ns": {
"db": "database0",
"coll": "collection0"
},
"updateDescription": {
"updatedFields": {
"$$exists": true
},
"removedFields": {
"$$exists": true
},
"truncatedArrays": {
"$$exists": true
},
"disambiguatedPaths": {
"$$exists": false
}
}
}
}
]
},
{
"description": "disambiguatedPaths is present on updateDescription when an ambiguous path is present",
"operations": [
Expand Down
186 changes: 186 additions & 0 deletions test/client-side-encryption/spec/unified/accessToken-azure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{
"description": "accessToken-azure",
"schemaVersion": "1.28",
"runOnRequirements": [
{
"minServerVersion": "4.1.10",
"csfle": {
"minLibmongocryptVersion": "1.6.0"
}
}
],
"createEntities": [
{
"client": {
"id": "client",
"autoEncryptOpts": {
"keyVaultNamespace": "keyvault.datakeys",
"kmsProviders": {
"azure": {
"accessToken": {
"$$placeholder": 1
}
}
}
}
}
},
{
"database": {
"id": "db",
"client": "client",
"databaseName": "db"
}
},
{
"collection": {
"id": "coll",
"database": "db",
"collectionName": "coll"
}
},
{
"clientEncryption": {
"id": "clientEncryption",
"clientEncryptionOpts": {
"keyVaultClient": "client",
"keyVaultNamespace": "keyvault.datakeys",
"kmsProviders": {
"azure": {
"accessToken": {
"$$placeholder": 1
}
}
}
}
}
}
],
"initialData": [
{
"databaseName": "db",
"collectionName": "coll",
"documents": [],
"createOptions": {
"validator": {
"$jsonSchema": {
"properties": {
"secret": {
"encrypt": {
"keyId": [
{
"$binary": {
"base64": "AZURE+AAAAAAAAAAAAAAAA==",
"subType": "04"
}
}
],
"bsonType": "string",
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
}
}
},
"bsonType": "object"
}
}
}
},
{
"databaseName": "keyvault",
"collectionName": "datakeys",
"documents": [
{
"_id": {
"$binary": {
"base64": "AZURE+AAAAAAAAAAAAAAAA==",
"subType": "04"
}
},
"keyAltNames": [
"my-key"
],
"keyMaterial": {
"$binary": {
"base64": "n+HWZ0ZSVOYA3cvQgP7inN4JSXfOH85IngmeQxRpQHjCCcqT3IFqEWNlrsVHiz3AELimHhX4HKqOLWMUeSIT6emUDDoQX9BAv8DR1+E1w4nGs/NyEneac78EYFkK3JysrFDOgl2ypCCTKAypkn9CkAx1if4cfgQE93LW4kczcyHdGiH36CIxrCDGv1UzAvERN5Qa47DVwsM6a+hWsF2AAAJVnF0wYLLJU07TuRHdMrrphPWXZsFgyV+lRqJ7DDpReKNO8nMPLV/mHqHBHGPGQiRdb9NoJo8CvokGz4+KE8oLwzKf6V24dtwZmRkrsDV4iOhvROAzz+Euo1ypSkL3mw==",
"subType": "00"
}
},
"creationDate": {
"$date": {
"$numberLong": "1552949630483"
}
},
"updateDate": {
"$date": {
"$numberLong": "1552949630483"
}
},
"status": {
"$numberInt": "0"
},
"masterKey": {
"provider": "azure",
"keyVaultEndpoint": "key-vault-csfle.vault.azure.net",
"keyName": "key-name-csfle"
}
}
]
}
],
"tests": [
{
"description": "Auto encrypt using access token Azure credentials",
"operations": [
{
"name": "insertOne",
"arguments": {
"document": {
"_id": 1,
"secret": "string0"
}
},
"object": "coll"
}
],
"outcome": [
{
"documents": [
{
"_id": 1,
"secret": {
"$binary": {
"base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==",
"subType": "06"
}
}
}
],
"collectionName": "coll",
"databaseName": "db"
}
]
},
{
"description": "Explicit encrypt using access token Azure credentials",
"operations": [
{
"name": "encrypt",
"object": "clientEncryption",
"arguments": {
"value": "string0",
"opts": {
"keyAltName": "my-key",
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
}
},
"expectResult": {
"$binary": {
"base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==",
"subType": "06"
}
}
}
]
}
]
}
Loading
Loading