-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Query Optimization
According to the driver spec for CSFLE:
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.