-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
chore: comments on CSFLE feature branch PR#2 #15407
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
chore: comments on CSFLE feature branch PR#2 #15407
Conversation
@@ -16,104 +16,6 @@ The resulting document will look similar to the following to a client that doesn | |||
|
|||
You can read more about CSFLE on the [MongoDB CSFLE documentation](https://www.mongodb.com/docs/manual/core/csfle/) and [this blog post about CSFLE in Node.js](https://www.mongodb.com/developer/languages/javascript/client-side-field-level-encryption-csfle-mongodb-node/). | |||
|
|||
Note that Mongoose does **not** currently have any Mongoose-specific APIs for CSFLE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this to the bottom of the page to emphasize the new Mongoose API for FLE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, lint will need to be resolved though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR provides additional comments on the CSFLE feature branch by adding new tests for duplicate key handling in discriminator schemas, updating the documentation for field-level encryption, and adding Typescript support for Model.clientEncryption().
- New integration tests for cloned parent schemas with CSFLE and queryable encryption
- Minor refactor with optional chaining on connection.close() and comment clarification in sort function
- Documentation updates with revised instructions and an added section for Manual FLE
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
test/encryption/encryption.test.js | Added new tests to verify error throwing for duplicate encrypted keys and minor code refinements |
docs/field-level-encryption.md | Updated documentation text, restructured content, and added Manual FLE setup instructions |
model = connection.model('Schema', schema); | ||
|
||
assert.throws(() => { | ||
const clonedSchema = schema.clone().add({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In an ideal world, we would support this behavior because there are a number of users that rely on this pattern. However, we can consider throwing an error when using cloned schemas for disctiminator()
a simplifying assumption, and add support for it later if there is demand.
Summary
This PR address a few more comments on the CSFLE feature branch: #15390
Additionally, I did a final review of the documentation and made a few small changes. Additionally, I added Typescript support for the new
clientEncryption()
method on Mongoose's Model class.Examples