Skip to content

CSHARP-5453: Add builder for CSFLE schemas #1631

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

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

papafe
Copy link
Contributor

@papafe papafe commented Mar 7, 2025

No description provided.

@papafe papafe requested review from damieng and sanych-sun March 12, 2025 12:55
@papafe
Copy link
Contributor Author

papafe commented Mar 12, 2025

@sanych-sun @damieng Can you give a look at the current state of the API? It's mostly functioning too, but I would like to get some feedback before writing tests.
Some notes:

  • At the moment the naming is derived from the name the fields have in the json schema, as presented in the documentation(here and here).
  • I taken examples mostly from the documentation pages, with some differences regarding the keyId.
  • I'll take care of the xml docs only at the end.

@papafe papafe marked this pull request as ready for review May 5, 2025 09:30
@papafe papafe requested a review from a team as a code owner May 5, 2025 09:30
@papafe papafe changed the title CSHARP-5453: Improve field encryption usability with attributes/API CSHARP-5453: Add builder for CSFLE schemas May 5, 2025
@papafe
Copy link
Contributor Author

papafe commented May 5, 2025

@sanych-sun @damieng A couple of notes for the review:

  • I have decided to reuse EncryptionAlgorithm and not create a new enum, even though EncryptionAlgorithm contains some values that are not valid for the schema, but will throw an exception.
  • bsonType is actually optional, differently from what we discussed together. For this reason I slightly modified the overloads to avoid ambiguities when calling the methods.
  • The whole encrypt section of a field could be empty. This is supported in the PR

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

Successfully merging this pull request may close these issues.

2 participants