Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
Click here >
Docs Menu
Docs Home
/ /

CSFLE Quick Start

In this tutorial, you can learn how to use automatic Client-Side Field Level Encryption (CSFLE) and a MongoDB driver to encrypt a document.

The tutorial includes the following sections:

  • Set Up Your Project: Set up your project files and assign required variables.

  • Configure Encryption: Create an encryption key and configure your application for Client-Side Field Level Encryption.

  • Perform Encrypted Operations: Insert and query encrypted documents.

Important

Do Not Use this Application In Production

Since this example application stores an encryption key on your application's filesystem, you risk unauthorized access to the key or loss of the key to decrypt your data.

To view a tutorial that demonstrates how to create a production-ready CSFLE-enabled application, see CSFLE Tutorials.

To complete and run the code in this guide, you need to set up your development environment as shown in the Installation Requirements page.

To see the complete code for the sample application, select your programming language in the language selector.

To learn how to create a production-ready CSFLE with a remote KMS, see the CSFLE Tutorials.

To learn how CSFLE works, see CSFLE Fundamentals.

To learn more about the topics mentioned in this guide, see the following resources:

Back

Installation Requirements

On this page