Skip to content
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

Encrypt on Insert? #15

Open
dguedry opened this issue Mar 18, 2017 · 1 comment
Open

Encrypt on Insert? #15

dguedry opened this issue Mar 18, 2017 · 1 comment

Comments

@dguedry
Copy link

dguedry commented Mar 18, 2017

Really cool solution. Are inserts into collections not encrypted? Updates encrypt just fine, but when initially inserting, I get plain text on the server-side collection. Thanks.

@dguedry
Copy link
Author

dguedry commented Mar 20, 2017

Turns out that the following statement was evaluating to true in CollectionEncryption:

if (self.schema && !Match.test(doc, self.schema)) {
// if the document does not match the schema we stop before encrypting
// since collection2 will deny the db insert anyway
return doc;
}

I commented it out and the inserts are being encrypted now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant