|
| 1 | +{ |
| 2 | + "runOn": [ |
| 3 | + { |
| 4 | + "minServerVersion": "6.0.0", |
| 5 | + "topology": [ |
| 6 | + "replicaset", |
| 7 | + "sharded" |
| 8 | + ] |
| 9 | + } |
| 10 | + ], |
| 11 | + "database_name": "default", |
| 12 | + "collection_name": "default", |
| 13 | + "data": [], |
| 14 | + "encrypted_fields": { |
| 15 | + "escCollection": "enxcol_.default.esc", |
| 16 | + "eccCollection": "enxcol_.default.ecc", |
| 17 | + "ecocCollection": "enxcol_.default.ecoc", |
| 18 | + "fields": [ |
| 19 | + { |
| 20 | + "keyId": { |
| 21 | + "$binary": { |
| 22 | + "base64": "EjRWeBI0mHYSNBI0VniQEg==", |
| 23 | + "subType": "04" |
| 24 | + } |
| 25 | + }, |
| 26 | + "path": "encryptedIndexed", |
| 27 | + "bsonType": "string", |
| 28 | + "queries": { |
| 29 | + "queryType": "equality", |
| 30 | + "contention": { |
| 31 | + "$numberLong": "0" |
| 32 | + } |
| 33 | + } |
| 34 | + }, |
| 35 | + { |
| 36 | + "keyId": { |
| 37 | + "$binary": { |
| 38 | + "base64": "q83vqxI0mHYSNBI0VniQEg==", |
| 39 | + "subType": "04" |
| 40 | + } |
| 41 | + }, |
| 42 | + "path": "encryptedUnindexed", |
| 43 | + "bsonType": "string" |
| 44 | + } |
| 45 | + ] |
| 46 | + }, |
| 47 | + "key_vault_data": [ |
| 48 | + { |
| 49 | + "_id": { |
| 50 | + "$binary": { |
| 51 | + "base64": "EjRWeBI0mHYSNBI0VniQEg==", |
| 52 | + "subType": "04" |
| 53 | + } |
| 54 | + }, |
| 55 | + "keyMaterial": { |
| 56 | + "$binary": { |
| 57 | + "base64": "sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==", |
| 58 | + "subType": "00" |
| 59 | + } |
| 60 | + }, |
| 61 | + "creationDate": { |
| 62 | + "$date": { |
| 63 | + "$numberLong": "1648914851981" |
| 64 | + } |
| 65 | + }, |
| 66 | + "updateDate": { |
| 67 | + "$date": { |
| 68 | + "$numberLong": "1648914851981" |
| 69 | + } |
| 70 | + }, |
| 71 | + "status": { |
| 72 | + "$numberInt": "0" |
| 73 | + }, |
| 74 | + "masterKey": { |
| 75 | + "provider": "local" |
| 76 | + } |
| 77 | + }, |
| 78 | + { |
| 79 | + "_id": { |
| 80 | + "$binary": { |
| 81 | + "base64": "q83vqxI0mHYSNBI0VniQEg==", |
| 82 | + "subType": "04" |
| 83 | + } |
| 84 | + }, |
| 85 | + "keyMaterial": { |
| 86 | + "$binary": { |
| 87 | + "base64": "HBk9BWihXExNDvTp1lUxOuxuZK2Pe2ZdVdlsxPEBkiO1bS4mG5NNDsQ7zVxJAH8BtdOYp72Ku4Y3nwc0BUpIKsvAKX4eYXtlhv5zUQxWdeNFhg9qK7qb8nqhnnLeT0f25jFSqzWJoT379hfwDeu0bebJHr35QrJ8myZdPMTEDYF08QYQ48ShRBli0S+QzBHHAQiM2iJNr4svg2WR8JSeWQ==", |
| 88 | + "subType": "00" |
| 89 | + } |
| 90 | + }, |
| 91 | + "creationDate": { |
| 92 | + "$date": { |
| 93 | + "$numberLong": "1648914851981" |
| 94 | + } |
| 95 | + }, |
| 96 | + "updateDate": { |
| 97 | + "$date": { |
| 98 | + "$numberLong": "1648914851981" |
| 99 | + } |
| 100 | + }, |
| 101 | + "status": { |
| 102 | + "$numberInt": "0" |
| 103 | + }, |
| 104 | + "masterKey": { |
| 105 | + "provider": "local" |
| 106 | + } |
| 107 | + } |
| 108 | + ], |
| 109 | + "tests": [ |
| 110 | + { |
| 111 | + "description": "Compact works", |
| 112 | + "clientOptions": { |
| 113 | + "autoEncryptOpts": { |
| 114 | + "kmsProviders": { |
| 115 | + "local": { |
| 116 | + "key": { |
| 117 | + "$binary": { |
| 118 | + "base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", |
| 119 | + "subType": "00" |
| 120 | + } |
| 121 | + } |
| 122 | + } |
| 123 | + } |
| 124 | + } |
| 125 | + }, |
| 126 | + "operations": [ |
| 127 | + { |
| 128 | + "name": "runCommand", |
| 129 | + "object": "database", |
| 130 | + "command_name": "compactStructuredEncryptionData", |
| 131 | + "arguments": { |
| 132 | + "command": { |
| 133 | + "compactStructuredEncryptionData": "default" |
| 134 | + } |
| 135 | + } |
| 136 | + } |
| 137 | + ], |
| 138 | + "expectations": [ |
| 139 | + { |
| 140 | + "command_started_event": { |
| 141 | + "command": { |
| 142 | + "listCollections": 1, |
| 143 | + "filter": { |
| 144 | + "name": "default" |
| 145 | + } |
| 146 | + }, |
| 147 | + "command_name": "listCollections" |
| 148 | + } |
| 149 | + }, |
| 150 | + { |
| 151 | + "command_started_event": { |
| 152 | + "command": { |
| 153 | + "find": "datakeys", |
| 154 | + "filter": { |
| 155 | + "$or": [ |
| 156 | + { |
| 157 | + "_id": { |
| 158 | + "$in": [ |
| 159 | + { |
| 160 | + "$binary": { |
| 161 | + "base64": "EjRWeBI0mHYSNBI0VniQEg==", |
| 162 | + "subType": "04" |
| 163 | + } |
| 164 | + }, |
| 165 | + { |
| 166 | + "$binary": { |
| 167 | + "base64": "q83vqxI0mHYSNBI0VniQEg==", |
| 168 | + "subType": "04" |
| 169 | + } |
| 170 | + } |
| 171 | + ] |
| 172 | + } |
| 173 | + }, |
| 174 | + { |
| 175 | + "keyAltNames": { |
| 176 | + "$in": [] |
| 177 | + } |
| 178 | + } |
| 179 | + ] |
| 180 | + }, |
| 181 | + "$db": "keyvault", |
| 182 | + "readConcern": { |
| 183 | + "level": "majority" |
| 184 | + } |
| 185 | + }, |
| 186 | + "command_name": "find" |
| 187 | + } |
| 188 | + }, |
| 189 | + { |
| 190 | + "command_started_event": { |
| 191 | + "command": { |
| 192 | + "compactStructuredEncryptionData": "default", |
| 193 | + "compactionTokens": { |
| 194 | + "encryptedIndexed": { |
| 195 | + "$binary": { |
| 196 | + "base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=", |
| 197 | + "subType": "00" |
| 198 | + } |
| 199 | + }, |
| 200 | + "encryptedUnindexed": { |
| 201 | + "$binary": { |
| 202 | + "base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=", |
| 203 | + "subType": "00" |
| 204 | + } |
| 205 | + } |
| 206 | + } |
| 207 | + }, |
| 208 | + "command_name": "compactStructuredEncryptionData" |
| 209 | + } |
| 210 | + } |
| 211 | + ] |
| 212 | + }, |
| 213 | + { |
| 214 | + "description": "Compact errors on an unencrypted client", |
| 215 | + "operations": [ |
| 216 | + { |
| 217 | + "name": "runCommand", |
| 218 | + "object": "database", |
| 219 | + "command_name": "compactStructuredEncryptionData", |
| 220 | + "arguments": { |
| 221 | + "command": { |
| 222 | + "compactStructuredEncryptionData": "default" |
| 223 | + } |
| 224 | + }, |
| 225 | + "result": { |
| 226 | + "errorContains": "'compactStructuredEncryptionData.compactionTokens' is missing" |
| 227 | + } |
| 228 | + } |
| 229 | + ] |
| 230 | + } |
| 231 | + ] |
| 232 | +} |
0 commit comments