-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add types in dmmfparser for encryption #105
base: next
Are you sure you want to change the base?
fix: add types in dmmfparser for encryption #105
Conversation
Pull Request Test Coverage Report for Build 8354948239Details
💛 - Coveralls |
Thank you! Have you tested this in a MongoDB project? It feels like it should work, but I'd like to make sure the tree traversal works for both models and types, switching to the correct current model/type when navigating relations, as mentionned in #74. |
Yes, I've tested this in MongoDB project. Actually I also needed this in our project where encryption in the types was not working. If you have any specific test in your mind, please let me know. I can test that as well. |
The test cases I have in mind are:
I'm not sure how deeply nested types and models can be with each other, but ensuring that traversal of the relation inclusion graph finds the correct encrypted fields would be the way to validate this. |
During create or update, return from decryptOnRead only if the model doesn't have any connections
@franky47 I tested these scenarios and found an issue in the first scenario: "Starting from a model with no encrypted fields, include/select a relation to a model/type that does have encrypted fields, and ensure encrypt-on-write / decrypt-on-read" |
@franky47 could you review the PR again? Let me know if you have any thoughts. |
Fixes #74