...
1{
2 "description": "createDataKey-kms_providers-invalid",
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 "commandSucceededEvent",
16 "commandFailedEvent"
17 ]
18 }
19 },
20 {
21 "clientEncryption": {
22 "id": "clientEncryption0",
23 "clientEncryptionOpts": {
24 "keyVaultClient": "client0",
25 "keyVaultNamespace": "keyvault.datakeys",
26 "kmsProviders": {
27 "aws": {
28 "accessKeyId": {
29 "$$placeholder": 1
30 },
31 "secretAccessKey": {
32 "$$placeholder": 1
33 }
34 }
35 }
36 }
37 }
38 }
39 ],
40 "tests": [
41 {
42 "description": "create data key without required master key fields",
43 "operations": [
44 {
45 "name": "createDataKey",
46 "object": "clientEncryption0",
47 "arguments": {
48 "kmsProvider": "aws",
49 "opts": {
50 "masterKey": {}
51 }
52 },
53 "expectError": {
54 "isClientError": true
55 }
56 }
57 ],
58 "expectEvents": [
59 {
60 "client": "client0",
61 "events": []
62 }
63 ]
64 },
65 {
66 "description": "create data key with invalid master key field",
67 "operations": [
68 {
69 "name": "createDataKey",
70 "object": "clientEncryption0",
71 "arguments": {
72 "kmsProvider": "local",
73 "opts": {
74 "masterKey": {
75 "invalid": 1
76 }
77 }
78 },
79 "expectError": {
80 "isClientError": true
81 }
82 }
83 ],
84 "expectEvents": [
85 {
86 "client": "client0",
87 "events": []
88 }
89 ]
90 },
91 {
92 "description": "create data key with invalid master key",
93 "operations": [
94 {
95 "name": "createDataKey",
96 "object": "clientEncryption0",
97 "arguments": {
98 "kmsProvider": "aws",
99 "opts": {
100 "masterKey": {
101 "key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0",
102 "region": "invalid"
103 }
104 }
105 },
106 "expectError": {
107 "isClientError": true
108 }
109 }
110 ],
111 "expectEvents": [
112 {
113 "client": "client0",
114 "events": []
115 }
116 ]
117 }
118 ]
119}
View as plain text