wheresvic / mongoose-field-encryption

A simple symmetric encryption plugin for individual fields. Dependency free, only mongoose peer dependency.
MIT License
74 stars 32 forks source link

Added options for extra flexibility in mongoose-field-encryption behavior #100

Closed adidaslevy closed 1 year ago

adidaslevy commented 1 year ago

Commits seem to be from different accounts because adilevyattenti is my work profile (Done by SourceTree on my PC)

wheresvic commented 1 year ago

@adidaslevy thanks for the PR - there are quite a few changes here so it might take me some time to go through all of them to make sure that we maintain backwards compatibility :)

Please bear with me!

wheresvic commented 1 year ago

@adidaslevy I do not see how the decryption for encryptEachArrayItem is being done. Could you add a test for this?

There are actually quite a few changes here. Ideally I would like to have a separate PR for each option so that we have a clean history and if there are problems we could quickly roll-back feature by feature. If you'd like to do this great otherwise I can also do it.

Thanks!

adidaslevy commented 1 year ago

@adidaslevy I do not see how the decryption for encryptEachArrayItem is being done. Could you add a test for this?

There are actually quite a few changes here. Ideally I would like to have a separate PR for each option so that we have a clean history and if there are problems we could quickly roll-back feature by feature. If you'd like to do this great otherwise I can also do it.

Thanks!

Sure, NP. I'll submit the PRs for each option. Anyway, the priority issue here is the exception that is thrown, and needs to be taken care of.

The rest will come later. I'll do it by next week (Got some pressure from peers - for other tasks)

adidaslevy commented 1 year ago

Closing the PR,

I'm going to split it: First - the null option and exception option (to my mind they should be bundled) will be reviewed, then the other stuff.