-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Field Level Encryption, Schema
-
None
-
3
-
Iteration Johannesburg
I’m creating the following schema server side:
db.getSiblingDB("testdb").runCommand( { "collMod" : "testcol", "validator" : { "$jsonSchema" : { "bsonType" : "object", "properties" : { "subscriber_ssn_nbr" : { "encrypt" : { "keyId" : [UUID("1618bad4-936d-4a9e-aa30-06629f1ee001")], "algorithm" : "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" } }, "claimArray": { "bsonType": "array", "items": { "bsonType" : "object", "properties": { "claimId": { "encrypt" : { "keyId" : [UUID("1618bad4-936d-4a9e-aa30-06629f1ee001")], "algorithm" : "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" } } } } } } } } } )
From Mongo Shell it’s executed and I get an ok: 1. It does enforcement properly as well (we’re using manual encryption). But from Compass I get a warning/error “Array elements must have type BinData, found object” I think this is worth investigating (or could be a potential bug?)