...
1description: rewrapManyDataKey-decrypt_failure
2
3schemaVersion: "1.8"
4
5runOnRequirements:
6 - csfle: true
7
8createEntities:
9 - client:
10 id: &client0 client0
11 observeEvents:
12 - commandStartedEvent
13 - clientEncryption:
14 id: &clientEncryption0 clientEncryption0
15 clientEncryptionOpts:
16 keyVaultClient: *client0
17 keyVaultNamespace: keyvault.datakeys
18 kmsProviders:
19 aws: { accessKeyId: { $$placeholder: 1 }, secretAccessKey: { $$placeholder: 1 } }
20 azure: { tenantId: { $$placeholder: 1 }, clientId: { $$placeholder: 1 }, clientSecret: { $$placeholder: 1 } }
21 gcp: { email: { $$placeholder: 1 }, privateKey: { $$placeholder: 1 } }
22 kmip: { endpoint: { $$placeholder: 1 } }
23 local: { key: { $$placeholder: 1 } }
24 - database:
25 id: &database0 database0
26 client: *client0
27 databaseName: &database0Name keyvault
28 - collection:
29 id: &collection0 collection0
30 database: *database0
31 collectionName: &collection0Name datakeys
32
33initialData:
34 - databaseName: *database0Name
35 collectionName: *collection0Name
36 documents:
37 - _id: { $binary: { base64: YXdzYXdzYXdzYXdzYXdzYQ==, subType: "04" } }
38 keyAltNames: ["aws_key"]
39 keyMaterial: { $binary: { base64: AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L, subType: "00" } }
40 creationDate: { $date: { $numberLong: "1641024000000" } }
41 updateDate: { $date: { $numberLong: "1641024000000" } }
42 status: 1
43 masterKey:
44 provider: aws
45 # "us-east-1" changed to "us-east-2" in both key and region.
46 key: arn:aws:kms:us-east-2:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0
47 region: us-east-2
48
49tests:
50 - description: "rewrap data key that fails during decryption due to invalid masterKey"
51 operations:
52 - name: rewrapManyDataKey
53 object: *clientEncryption0
54 arguments:
55 filter: {}
56 opts:
57 provider: local
58 expectError:
59 isClientError: true
60 expectEvents:
61 - client: *client0
62 events:
63 - commandStartedEvent:
64 commandName: find
65 databaseName: *database0Name
66 command:
67 find: *collection0Name
68 filter: {}
69 readConcern: { level: majority }
View as plain text