Hi
Is it possible to make an array of elements searchable (using encryption algorithm AEAD_AES_256_CBC_HMAC_SHA_512_Deterministic
) and encrypted?
I have attempted to do so with the following schema, but the fields (Email
etc) do not appear encrypted in Compass.
As I understand it, I realise I could use AEAD_AES_256_CBC_HMAC_SHA_512_Random
encryption method, but then the sub fields of the object in the array wouldn’t be searchable
{
"dbName.collName": {
"bsonType": "object",
"encryptMetadata": {
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic",
"keyId": [UUID("6e662447-d086-43c3-ab1f-d2ebcf42a721")]
},
"properties": {
"Contacts": {
"bsonType": "array",
"items": {
"bsonType": "object",
"properties": {
"Email": { "bsonType": "string" },
"Notes": { "bsonType": "string" },
"Telephone": { "bsonType": "string" }
}
}
}
}
}
}