File tree Expand file tree Collapse file tree 6 files changed +668
-14
lines changed
SpecTests/client-side-encryption/tests
UnifiedSpecTests/client-side-encryption Expand file tree Collapse file tree 6 files changed +668
-14
lines changed Original file line number Diff line number Diff line change 78
78
"bsonType" : " string" ,
79
79
"algorithm" : " AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
80
80
}
81
+ },
82
+ "encrypted_string_kmip_delegated" : {
83
+ "encrypt" : {
84
+ "keyId" : [
85
+ {
86
+ "$uuid" : " 7411e9af-c688-4df7-8143-5e60ae96cba6"
87
+ }
88
+ ],
89
+ "bsonType" : " string" ,
90
+ "algorithm" : " AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
91
+ }
81
92
}
82
93
},
83
94
"bsonType" : " object"
Original file line number Diff line number Diff line change 78
78
"bsonType" : " string" ,
79
79
"algorithm" : " AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
80
80
}
81
+ },
82
+ "encrypted_string_kmip_delegated" : {
83
+ "encrypt" : {
84
+ "keyId" : [
85
+ {
86
+ "$uuid" : " 7411e9af-c688-4df7-8143-5e60ae96cba6"
87
+ }
88
+ ],
89
+ "bsonType" : " string" ,
90
+ "algorithm" : " AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
91
+ }
81
92
}
82
93
},
83
94
"bsonType" : " object"
Original file line number Diff line number Diff line change 78
78
"bsonType" : " string" ,
79
79
"algorithm" : " AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
80
80
}
81
+ },
82
+ "encrypted_string_kmip_delegated" : {
83
+ "encrypt" : {
84
+ "keyId" : [
85
+ {
86
+ "$uuid" : " 7411e9af-c688-4df7-8143-5e60ae96cba6"
87
+ }
88
+ ],
89
+ "bsonType" : " string" ,
90
+ "algorithm" : " AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
91
+ }
81
92
}
82
93
},
83
94
"bsonType" : " object"
117
128
" altname" ,
118
129
" kmip_altname"
119
130
]
131
+ },
132
+ {
133
+ "_id" : {
134
+ "$uuid" : " 7411e9af-c688-4df7-8143-5e60ae96cba6"
135
+ },
136
+ "keyMaterial" : {
137
+ "$binary" : {
138
+ "base64" : " 5TLMFWlguBWe5GUESTvOVtkdBsCrynhnV72XRyZ66/nk+EP9/1oEp1t1sg0+vwCTqULHjBiUE6DRx2mYD/Eup1+u2Jgz9/+1sV1drXeOPALNPkSgiZiDbIb67zRi+wTABEcKcegJH+FhmSGxwUoQAiHCsCbcvia5P8tN1lt98YQ=" ,
139
+ "subType" : " 00"
140
+ }
141
+ },
142
+ "creationDate" : {
143
+ "$date" : {
144
+ "$numberLong" : " 1634220190041"
145
+ }
146
+ },
147
+ "updateDate" : {
148
+ "$date" : {
149
+ "$numberLong" : " 1634220190041"
150
+ }
151
+ },
152
+ "status" : {
153
+ "$numberInt" : " 0"
154
+ },
155
+ "masterKey" : {
156
+ "provider" : " kmip" ,
157
+ "delegated" : true ,
158
+ "keyId" : " 11"
159
+ },
160
+ "keyAltNames" : [
161
+ " delegated"
162
+ ]
120
163
}
121
164
],
122
165
"tests" : [
218
261
]
219
262
}
220
263
}
264
+ },
265
+ {
266
+ "description" : " Insert a document with auto encryption using KMIP delegated KMS provider" ,
267
+ "clientOptions" : {
268
+ "autoEncryptOpts" : {
269
+ "kmsProviders" : {
270
+ "kmip" : {}
271
+ }
272
+ }
273
+ },
274
+ "operations" : [
275
+ {
276
+ "name" : " insertOne" ,
277
+ "arguments" : {
278
+ "document" : {
279
+ "_id" : 1 ,
280
+ "encrypted_string_kmip_delegated" : " string0"
281
+ }
282
+ }
283
+ }
284
+ ],
285
+ "expectations" : [
286
+ {
287
+ "command_started_event" : {
288
+ "command" : {
289
+ "listCollections" : 1 ,
290
+ "filter" : {
291
+ "name" : " default"
292
+ }
293
+ },
294
+ "command_name" : " listCollections"
295
+ }
296
+ },
297
+ {
298
+ "command_started_event" : {
299
+ "command" : {
300
+ "find" : " datakeys" ,
301
+ "filter" : {
302
+ "$or" : [
303
+ {
304
+ "_id" : {
305
+ "$in" : [
306
+ {
307
+ "$uuid" : " 7411e9af-c688-4df7-8143-5e60ae96cba6"
308
+ }
309
+ ]
310
+ }
311
+ },
312
+ {
313
+ "keyAltNames" : {
314
+ "$in" : []
315
+ }
316
+ }
317
+ ]
318
+ },
319
+ "$db" : " keyvault"
320
+ },
321
+ "command_name" : " find"
322
+ }
323
+ },
324
+ {
325
+ "command_started_event" : {
326
+ "command" : {
327
+ "insert" : " default" ,
328
+ "documents" : [
329
+ {
330
+ "_id" : 1 ,
331
+ "encrypted_string_kmip_delegated" : {
332
+ "$binary" : {
333
+ "base64" : " AXQR6a/GiE33gUNeYK6Wy6YCkB+8NVfAAjIbvLqyXIg6g1a8tXrym92DPoqmxpcdQyH0vQM3aFNMz7tZwQBimKs29ztZV/LWjM633HhO5ACl9A==" ,
334
+ "subType" : " 06"
335
+ }
336
+ }
337
+ }
338
+ ],
339
+ "ordered" : true
340
+ },
341
+ "command_name" : " insert"
342
+ }
343
+ }
344
+ ],
345
+ "outcome" : {
346
+ "collection" : {
347
+ "data" : [
348
+ {
349
+ "_id" : 1 ,
350
+ "encrypted_string_kmip_delegated" : {
351
+ "$binary" : {
352
+ "base64" : " AXQR6a/GiE33gUNeYK6Wy6YCkB+8NVfAAjIbvLqyXIg6g1a8tXrym92DPoqmxpcdQyH0vQM3aFNMz7tZwQBimKs29ztZV/LWjM633HhO5ACl9A==" ,
353
+ "subType" : " 06"
354
+ }
355
+ }
356
+ }
357
+ ]
358
+ }
359
+ }
221
360
}
222
361
]
223
362
}
Original file line number Diff line number Diff line change 161
161
"failPoint" : {
162
162
"configureFailPoint" : " failCommand" ,
163
163
"mode" : {
164
- "times" : 3
164
+ "times" : 2
165
165
},
166
166
"data" : {
167
167
"failCommands" : [
168
168
" listCollections" ,
169
169
" find"
170
170
],
171
171
"blockConnection" : true ,
172
- "blockTimeMS" : 20
172
+ "blockTimeMS" : 30
173
173
}
174
174
},
175
175
"clientOptions" : {
Original file line number Diff line number Diff line change 337
337
}
338
338
]
339
339
},
340
+ {
341
+ "description" : " create datakey with KMIP delegated KMS provider" ,
342
+ "operations" : [
343
+ {
344
+ "name" : " createDataKey" ,
345
+ "object" : " clientEncryption0" ,
346
+ "arguments" : {
347
+ "kmsProvider" : " kmip" ,
348
+ "opts" : {
349
+ "masterKey" : {
350
+ "delegated" : true
351
+ }
352
+ }
353
+ },
354
+ "expectResult" : {
355
+ "$$type" : " binData"
356
+ }
357
+ }
358
+ ],
359
+ "expectEvents" : [
360
+ {
361
+ "client" : " client0" ,
362
+ "events" : [
363
+ {
364
+ "commandStartedEvent" : {
365
+ "databaseName" : " keyvault" ,
366
+ "command" : {
367
+ "insert" : " datakeys" ,
368
+ "documents" : [
369
+ {
370
+ "_id" : {
371
+ "$$type" : " binData"
372
+ },
373
+ "keyMaterial" : {
374
+ "$$type" : " binData"
375
+ },
376
+ "creationDate" : {
377
+ "$$type" : " date"
378
+ },
379
+ "updateDate" : {
380
+ "$$type" : " date"
381
+ },
382
+ "status" : {
383
+ "$$exists" : true
384
+ },
385
+ "masterKey" : {
386
+ "provider" : " kmip" ,
387
+ "keyId" : {
388
+ "$$type" : " string"
389
+ },
390
+ "delegated" : true
391
+ }
392
+ }
393
+ ],
394
+ "writeConcern" : {
395
+ "w" : " majority"
396
+ }
397
+ }
398
+ }
399
+ }
400
+ ]
401
+ }
402
+ ]
403
+ },
340
404
{
341
405
"description" : " create datakey with local KMS provider" ,
342
406
"operations" : [
You can’t perform that action at this time.
0 commit comments