Docs HomeMongoDB Manual

Client-Side Field Level Encryption客户端字段级加密

MongoDB's Queryable Encryption feature is available (GA) in MongoDB 7.0 and later. To learn more about Queryable Encryption and compare its benefits with Client-Side Field Level Encryption, see Queryable Encryption.
MongoDB的可查询加密功能在MongoDB 7.0及更高版本中可用(GA)。要了解有关可查询加密的更多信息,并将其与客户端字段级加密的优势进行比较,请参阅可查询加密

Introduction介绍

Client-Side Field Level Encryption (CSFLE) is a feature that enables you to encrypt data in your application before you send it over the network to MongoDB. With CSFLE enabled, no MongoDB product has access to your data in an unencrypted form.客户端字段级加密(CSFLE)是一项功能,使您能够在通过网络将数据发送到MongoDB之前对应用程序中的数据进行加密。启用CSFLE后,任何MongoDB产品都无法以未加密的形式访问您的数据。

You can set up CSFLE using the following mechanisms:您可以使用以下机制设置CSFLE:

  • Automatic Encryption: Enables you to perform encrypted read and write operations without you having to write code to specify how to encrypt fields.自动加密:使您能够执行加密的读写操作,而无需编写代码来指定如何加密字段。
  • Explicit Encryption: Enables you to perform encrypted read and write operations through your MongoDB driver's encryption library. You must specify the logic for encryption with this library throughout your application.显式加密:使您能够通过MongoDB驱动程序的加密库执行加密的读写操作。您必须在整个应用程序中指定使用此库进行加密的逻辑。

The following table shows which MongoDB server products support which CSFLE mechanisms:下表显示了哪些MongoDB服务器产品支持哪些CSFLE机制:

Product Name产品名称Supports Automatic Encryption支持自动加密Supports Explicit Encryption支持显式加密
MongoDB AtlasYesYes
MongoDB Enterprise AdvancedYesYes
MongoDB Community EditionNoYes

To learn which MongoDB drivers support CSFLE, see CSFLE Compatibility.要了解哪些MongoDB驱动程序支持CSFLE,请参阅CSFLE兼容性

Features功能

To learn about the security benefits of CSFLE for your applications, see the Features page.要了解CSFLE为您的应用程序带来的安全优势,请参阅功能页面。

Install安装

To learn what you must install to use CSFLE, see the Installation Requirements page.要了解使用CSFLE必须安装什么,请参阅安装要求页面。

Quick Start快速入门

To start using CSFLE, see the Quick Start.要开始使用CSFLE,请参阅快速入门

Throughout this guide, code examples use placeholder text. 在本指南中,代码示例使用占位符文本。Before you run the examples, substitute your own values for these placeholders.在运行示例之前,请将这些占位符替换为您自己的值。

For example:例如:

dek_id := "<Your Base64 DEK ID>"

You would replace everything between quotes with your DEK ID.你会用你的DEK ID替换报价之间的所有内容。

dek_id := "abc123"

Fundamentals基础

To learn how CSFLE works and how to set it up, see the Fundamentals section.要了解CSFLE的工作原理和设置方法,请参阅基础知识部分。

The fundamentals section contains the following pages:基本原理部分包含以下页面:

Tutorials教程

To learn how to perform specific tasks with CSFLE, see the Tutorials section.要了解如何使用CSFLE执行特定任务,请参阅教程部分。

Reference参考资料

To view information to help you develop your CSFLE enabled applications, see the Reference section.要查看帮助您开发启用CSFLE的应用程序的信息,请参阅参考部分。

The reference section contains the following pages:参考部分包含以下页面: