Closed danyhiol closed 3 years ago
Collection2 ultimate goal is to ensure consistent data according to the attached schema, so encrypting and decrypting fields seems out of hand but Collection2 shouldn't get in your way if you'd wish to do so. I recommend that you check out custom and autovalue. You can manipulate the storage using checks like isInsert, isUpdate and many more.
@harryadel indeed one can make use of custom and autoValue when inserting the data. But this means that one has to find another way (out of the schema) to decrypt the data. In that case, since my app is using graphql, i'll be using direcives for that purpose. Thanks for the hint.
Feel free to reopen if the problem still exists. Thank you.
MongoDB from version 4.2 offers the possibility to run encryption at field level in order to secure some data on the server. It would be nice if that could be incorporated into this package or at least if there is a document on how to do such using this package maybe together with SimpleSchema2. When researching, I found this package and this one that already to the same, but outside of the schema.