...

Text file src/go.mongodb.org/mongo-driver/testdata/client-side-encryption/legacy/fle2v2-MissingKey.yml

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

     1# Requires libmongocrypt 1.8.0.
     2runOn:
     3  - minServerVersion: "7.0.0"
     4    # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
     5    # FLE 2 Encrypted collections are not supported on standalone.
     6    topology: [ "replicaset", "sharded", "load-balanced" ]
     7database_name: &database_name "default"
     8collection_name: &collection_name "default"
     9data: [
    10  &doc0 {
    11    "encryptedUnindexed": {
    12      "$binary": {
    13          "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==",
    14          "subType": "06"
    15      }
    16    }
    17  }
    18]
    19encrypted_fields: {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]}
    20key_vault_data: []
    21tests:
    22  - description: "FLE2 encrypt fails with mising key"
    23    clientOptions:
    24      autoEncryptOpts:
    25        kmsProviders:
    26          local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}}
    27    operations:
    28      - name: insertOne
    29        arguments:
    30          document: { _id: 1, encryptedIndexed: "123" }
    31        result:
    32          errorContains: "not all keys requested were satisfied"
    33  - description: "FLE2 decrypt fails with mising key"
    34    clientOptions:
    35      autoEncryptOpts:
    36        kmsProviders:
    37          local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}}
    38    operations:
    39      - name: find
    40        arguments:
    41          filter: { }
    42        result:
    43          errorContains: "not all keys requested were satisfied"

View as plain text