...

Text file src/go.mongodb.org/mongo-driver/testdata/client-side-encryption/unified/rewrapManyDataKey-decrypt_failure.json

Documentation: go.mongodb.org/mongo-driver/testdata/client-side-encryption/unified

     1{
     2  "description": "rewrapManyDataKey-decrypt_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": "YXdzYXdzYXdzYXdzYXdzYQ==",
    90              "subType": "04"
    91            }
    92          },
    93          "keyAltNames": [
    94            "aws_key"
    95          ],
    96          "keyMaterial": {
    97            "$binary": {
    98              "base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gFXJqbF0Fy872MD7xl56D/2AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDO7HPisPUlGzaio9vgIBEIB7/Qow46PMh/8JbEUbdXgTGhLfXPE+KIVW7T8s6YEMlGiRvMu7TV0QCIUJlSHPKZxzlJ2iwuz5yXeOag+EdY+eIQ0RKrsJ3b8UTisZYzGjfzZnxUKLzLoeXremtRCm3x47wCuHKd1dhh6FBbYt5TL2tDaj+vL2GBrKat2L",
    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": "aws",
   115            "key": "arn:aws:kms:us-east-2:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0",
   116            "region": "us-east-2"
   117          }
   118        }
   119      ]
   120    }
   121  ],
   122  "tests": [
   123    {
   124      "description": "rewrap data key that fails during decryption due to invalid masterKey",
   125      "operations": [
   126        {
   127          "name": "rewrapManyDataKey",
   128          "object": "clientEncryption0",
   129          "arguments": {
   130            "filter": {},
   131            "opts": {
   132              "provider": "local"
   133            }
   134          },
   135          "expectError": {
   136            "isClientError": true
   137          }
   138        }
   139      ],
   140      "expectEvents": [
   141        {
   142          "client": "client0",
   143          "events": [
   144            {
   145              "commandStartedEvent": {
   146                "commandName": "find",
   147                "databaseName": "keyvault",
   148                "command": {
   149                  "find": "datakeys",
   150                  "filter": {},
   151                  "readConcern": {
   152                    "level": "majority"
   153                  }
   154                }
   155              }
   156            }
   157          ]
   158        }
   159      ]
   160    }
   161  ]
   162}

View as plain text