1{
2 "description": "rewrapManyDataKey-encrypt_failure",
3 "schemaVersion": "1.8",
4 "runOnRequirements": [
5 {
6 "csfle": true
7 }
8 ],
9 "createEntities": [
10 {
11 "client": {
12 "id": "client0",
13 "observeEvents": [
14 "commandStartedEvent"
15 ]
16 }
17 },
18 {
19 "clientEncryption": {
20 "id": "clientEncryption0",
21 "clientEncryptionOpts": {
22 "keyVaultClient": "client0",
23 "keyVaultNamespace": "keyvault.datakeys",
24 "kmsProviders": {
25 "aws": {
26 "accessKeyId": {
27 "$$placeholder": 1
28 },
29 "secretAccessKey": {
30 "$$placeholder": 1
31 }
32 },
33 "azure": {
34 "tenantId": {
35 "$$placeholder": 1
36 },
37 "clientId": {
38 "$$placeholder": 1
39 },
40 "clientSecret": {
41 "$$placeholder": 1
42 }
43 },
44 "gcp": {
45 "email": {
46 "$$placeholder": 1
47 },
48 "privateKey": {
49 "$$placeholder": 1
50 }
51 },
52 "kmip": {
53 "endpoint": {
54 "$$placeholder": 1
55 }
56 },
57 "local": {
58 "key": {
59 "$$placeholder": 1
60 }
61 }
62 }
63 }
64 }
65 },
66 {
67 "database": {
68 "id": "database0",
69 "client": "client0",
70 "databaseName": "keyvault"
71 }
72 },
73 {
74 "collection": {
75 "id": "collection0",
76 "database": "database0",
77 "collectionName": "datakeys"
78 }
79 }
80 ],
81 "initialData": [
82 {
83 "databaseName": "keyvault",
84 "collectionName": "datakeys",
85 "documents": [
86 {
87 "_id": {
88 "$binary": {
89 "base64": "bG9jYWxrZXlsb2NhbGtleQ==",
90 "subType": "04"
91 }
92 },
93 "keyAltNames": [
94 "local_key"
95 ],
96 "keyMaterial": {
97 "$binary": {
98 "base64": "ABKBldDEoDW323yejOnIRk6YQmlD9d3eQthd16scKL75nz2LjNL9fgPDZWrFFOlqlhMCFaSrNJfGrFUjYk5JFDO7soG5Syb50k1niJoKg4ilsj0L4mpimFUtTpOr2nzZOeQtvAksEXc7gsFgq8gV7t/U3lsaXPY7I0t42DfSE8EGlPdxRjFdHnxh+OR8h7U9b8Qs5K5UuhgyeyxaBZ1Hgw==",
99 "subType": "00"
100 }
101 },
102 "creationDate": {
103 "$date": {
104 "$numberLong": "1641024000000"
105 }
106 },
107 "updateDate": {
108 "$date": {
109 "$numberLong": "1641024000000"
110 }
111 },
112 "status": 1,
113 "masterKey": {
114 "provider": "local"
115 }
116 }
117 ]
118 }
119 ],
120 "tests": [
121 {
122 "description": "rewrap with invalid masterKey for AWS KMS provider",
123 "operations": [
124 {
125 "name": "rewrapManyDataKey",
126 "object": "clientEncryption0",
127 "arguments": {
128 "filter": {},
129 "opts": {
130 "provider": "aws",
131 "masterKey": {
132 "key": "arn:aws:kms:us-east-2:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0",
133 "region": "us-east-2"
134 }
135 }
136 },
137 "expectError": {
138 "isClientError": true
139 }
140 }
141 ],
142 "expectEvents": [
143 {
144 "client": "client0",
145 "events": [
146 {
147 "commandStartedEvent": {
148 "commandName": "find",
149 "databaseName": "keyvault",
150 "command": {
151 "find": "datakeys",
152 "filter": {},
153 "readConcern": {
154 "level": "majority"
155 }
156 }
157 }
158 }
159 ]
160 }
161 ]
162 },
163 {
164 "description": "rewrap with invalid masterKey for Azure KMS provider",
165 "operations": [
166 {
167 "name": "rewrapManyDataKey",
168 "object": "clientEncryption0",
169 "arguments": {
170 "filter": {},
171 "opts": {
172 "provider": "azure",
173 "masterKey": {
174 "keyVaultEndpoint": "invalid-vault-csfle.vault.azure.net",
175 "keyName": "invalid-name-csfle"
176 }
177 }
178 },
179 "expectError": {
180 "isClientError": true
181 }
182 }
183 ],
184 "expectEvents": [
185 {
186 "client": "client0",
187 "events": [
188 {
189 "commandStartedEvent": {
190 "commandName": "find",
191 "databaseName": "keyvault",
192 "command": {
193 "find": "datakeys",
194 "filter": {},
195 "readConcern": {
196 "level": "majority"
197 }
198 }
199 }
200 }
201 ]
202 }
203 ]
204 },
205 {
206 "description": "rewrap with invalid masterKey for GCP KMS provider",
207 "operations": [
208 {
209 "name": "rewrapManyDataKey",
210 "object": "clientEncryption0",
211 "arguments": {
212 "filter": {},
213 "opts": {
214 "provider": "gcp",
215 "masterKey": {
216 "projectId": "devprod-drivers",
217 "location": "global",
218 "keyRing": "invalid-ring-csfle",
219 "keyName": "invalid-name-csfle"
220 }
221 }
222 },
223 "expectError": {
224 "isClientError": true
225 }
226 }
227 ],
228 "expectEvents": [
229 {
230 "client": "client0",
231 "events": [
232 {
233 "commandStartedEvent": {
234 "commandName": "find",
235 "databaseName": "keyvault",
236 "command": {
237 "find": "datakeys",
238 "filter": {},
239 "readConcern": {
240 "level": "majority"
241 }
242 }
243 }
244 }
245 ]
246 }
247 ]
248 }
249 ]
250}
View as plain text