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

CSFLE / Encrypted Mongo Clients #362

Open
Ahmadre opened this issue Feb 9, 2024 · 2 comments
Open

CSFLE / Encrypted Mongo Clients #362

Ahmadre opened this issue Feb 9, 2024 · 2 comments

Comments

@Ahmadre
Copy link
Contributor

Ahmadre commented Feb 9, 2024

Does this package support Client Side Field Level Encryption?

For more see: https://www.mongodb.com/docs/manual/core/csfle/

It is very important for sensitive data (like Patients data or credit card data, so enterprise relevant) which we encrypt in our database and only wants that clients decrypt them in use.

It would be great to have all connection options (no not the connection string!) like MongoDB Native library supports for NodeJS applications (see: https://www.npmjs.com/package/mongodb ) and the Auto-Encryption/Explicit Encryption approaches.

@giorgiofran
Copy link
Contributor

Unfortunately my time is limited, and the Client side encryption is quite complicated, so at present I'm not planning to include it. But I agree with you that it would be nice to have this feature.
Which connection option would you need?

@Ahmadre
Copy link
Contributor Author

Ahmadre commented Feb 9, 2024

Unfortunately my time is limited, and the Client side encryption is quite complicated, so at present I'm not planning to include it. But I agree with you that it would be nice to have this feature. Which connection option would you need?

no problem :) let me try to port the native mongo driver code from NodeJS to Dart :) should be possible.

I will open a PR and let you know here :) thx @giorgiofran

Edit: The easiest version for CSFLE would be Auto-Encryption options while connecting:

const secureClient = new MongoClient(connectionString, {
      useNewUrlParser: true,
      useUnifiedTopology: true,
      monitorCommands: true,
      autoEncryption: {
          keyVaultNamespace,
          kmsProviders,
          schemaMap: patientSchema,
          extraOptions: extraOptions,
      },
});

(Source: https://www.mongodb.com/docs/manual/core/csfle/fundamentals/automatic-encryption/ and https://www.mongodb.com/docs/manual/core/csfle/reference/csfle-options-clients/#std-label-csfle-enc-options-example)

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

No branches or pull requests

2 participants