CSFLE JSON Schema should result in an error for isRemoteSchema:false if non-encrypted property is specified

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      According to the driver spec for CSFLE: 

      https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#schemamap

       

      Schemas supplied in the schemaMap only apply to configuring automatic encryption for client side encryption. Other validation rules in the JSON schema will not be enforced by the driver and will result in an error.

       

      As stated, a validation rule in the schemaMap such as the following should generate an error:

       

       

      {"bsonType":"object","encryptMetadata":{"keyId":[{"$binary": {"base64":"...==","subType":"04"}}]},"properties":{
      ...
        "name":{"bsonType":"string","description":"must be a string and is required"},
      ...
      }
      

      However, this is instance is currently ignored and no Exceptions are produced during CRUD operations on documents with encrypted fields.

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Christopher Cho (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: