You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**SCRAM (Default)**: The default and recommended mechanism for MongoDB, providing secure authentication using salted challenge-response methods.
19
+
-**SCRAM (Default)**: The default and simplest mechanism for MongoDB, providing secure authentication using salted challenge-response methods. (For production deployment we recommend using a more advanced authentication mechanism)
20
20
-**X.509 Certificate Authentication**: Certificate-based authentication that uses SSL/TLS certificates for verifying client identity, typically used in environments that require high security.
21
21
-**AWS IAM Authentication**:MongoDB Atlas supports AWS IAM authentication, allowing users to authenticate using their AWS Identity and Access Management roles, which is useful for integration with AWS services.
22
-
-**Workforce Federation Authentication**: Allows users to integrate MongoDB Atlas with external identity providers (IdPs) like Okta or Azure AD for centralized access management and single sign-on (SSO).
23
-
-**Workload Federation Authentication**: Enables authentication for applications and workloads by allowing them to assume predefined roles, simplifying access management for services running in hybrid or multi-cloud environments.
22
+
-**Workforce Identity Federation Authentication**: Allows users to integrate MongoDB Atlas with external identity providers (IdPs) like Okta or Azure AD for centralized access management and single sign-on (SSO).
23
+
-**Workload Identity Federation Authentication**: Enables authentication for applications and workloads by allowing them to assume predefined roles, simplifying access management for services running in hybrid or multi-cloud environments.
24
24
-**LDAP Authentication**: Allows integration with corporate directory services, enabling centralized management of user access across the organization.
Copy file name to clipboardExpand all lines: docs/queryable-encryption/index.mdx
+30-9Lines changed: 30 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,17 @@ import TabItem from '@theme/TabItem';
7
7
8
8
# Queryable Encryption
9
9
10
-
Queryable Encryption allows you to run queries on encrypted data without decrypting it on the server side. This feature provides enhanced security by keeping sensitive data encrypted throughout its lifecycle while maintaining the ability to perform queries.
10
+
## Introduction
11
+
12
+
Queryable Encryption is a groundbreaking technology that allows you to run specific queries on encrypted data without the need to decrypt it on the server. In MongoDB, this means sensitive data can remain encrypted throughout its lifecycle – at rest, in transit, and even during query processing. By enabling Queryable Encryption, you significantly reduce the attack surface by minimizing the exposure of plaintext data, even to authorized database administrators. This strengthens your security posture and helps meet stringent compliance requirements.
13
+
14
+
## Why is Queryable Encryption Important in MongoDB?
15
+
16
+
MongoDB, while offering various security features, can benefit significantly from Queryable Encryption for scenarios involving highly sensitive data. By implementing it, you ensure:
17
+
-**Enhanced Data Protection**: Sensitive data remains encrypted even when it is being processed on the database side, minimizing the risk of exposure in case of a security breach or unauthorized access.
18
+
-**Compliance with Regulations**: Helps meet stringent data privacy regulations like GDPR, HIPAA, and others that mandate strong encryption and control over sensitive information.
19
+
-**Reduced Insider Threat**: Even database administrators or authorized personnel with access to the database infrastructure cannot see the plaintext data without the appropriate decryption keys managed outside of the database.
20
+
-**Maintain Functionality**: Unlike traditional encryption where data needs to be decrypted for querying, Queryable Encryption allows you to perform specific types of queries directly on the encrypted data, preserving application functionality.
11
21
12
22
## Overview
13
23
@@ -16,20 +26,20 @@ Queryable Encryption allows you to run queries on encrypted data without decrypt
16
26
17
27
In MongoDB Atlas, Queryable Encryption is available for:
18
28
- M10 or larger clusters
19
-
- MongoDB 6.0 or later
29
+
- MongoDB 7.0 or later
20
30
- Enterprise or Atlas deployments
21
31
22
32
To enable Queryable Encryption:
23
-
1. Create an encryption key in your preferred Key Management System (AWS KMS, Azure Key Vault, GCP KMS)
33
+
1. Create an encryption key in your preferred Key Management System (local, AWS KMS, Azure Key Vault, GCP KMS)
24
34
2. Configure your Atlas cluster to use the KMS provider
25
35
3. Use the MongoDB driver with Queryable Encryption support
26
36
27
37
</TabItem>
28
38
<TabItemvalue="onprem"label="On-Premises">
29
39
30
40
For self-hosted MongoDB deployments:
31
-
- Requires Enterprise Edition
32
-
- MongoDB 6.0 or later
41
+
- Requires Enterprise Edition for Client Side Level Encryption (community versions support Queryable Encryption only)
42
+
- MongoDB 7.0 or later
33
43
- A supported Key Management System
34
44
35
45
Configuration steps:
@@ -40,6 +50,12 @@ Configuration steps:
40
50
</TabItem>
41
51
</Tabs>
42
52
53
+
## Key Concepts in Queryable Encryption:
54
+
55
+
-**Key Management System (KMS)**: A secure system for managing encryption keys. MongoDB Queryable Encryption relies on either local keys/on-premises vaults like Hasicorp, or external KMS providers like AWS KMS, Azure Key Vault, Google Cloud KMS to store and manage the cryptographic keys.
56
+
-**Encryption on Field Level Basis**: Encryption and decryption operations are performed on the client-side application before data is sent to or retrieved from the MongoDB server. This ensures that the server only handles encrypted data.
57
+
-**Encryption Schema**: Defines which fields in your documents need to be encrypted and specifies the type of encryption to be used for each field, influencing the types of queries that can be performed on that field.
58
+
43
59
## Implementation
44
60
45
61
@@ -159,29 +175,33 @@ Queryable Encryption supports various query types depending on the encryption al
159
175
160
176
1.**Equality Queries**
161
177
- Exact matches on encrypted fields
162
-
- Supported by all encryption algorithms
178
+
- Supported with deterministic encryption
179
+
- Example: `{"encryptedField": "exactValue"}`
180
+
163
181
164
182
2.**Range Queries**
165
183
- Comparison operators ($gt, $gte, $lt, $lte)
184
+
- Available for range-queryable encrypted fields
185
+
- Example: `{"encryptedField": {"$gt": "value"}}`
166
186
- Requires RangePreview algorithm
167
187
168
-
3.**Prefix Queries**
169
-
- String prefix matching
170
-
- Requires specialized string encryption
171
188
172
189
## Best Practices
173
190
174
191
1.**Key Management**
192
+
- Securely Manage KMS Credentials: Protect your KMS access keys and credentials diligently. Use best practices for secret management.
175
193
- Regularly rotate encryption keys
176
194
- Securely store and backup keys
177
195
- Use separate keys for different environments
178
196
179
197
2.**Performance Considerations**
198
+
- Understand Performance Implications: Queryable Encryption involves additional resources for indexing and storage on the server side. Test and optimize your application accordingly. Tune the relevant parameters and document design for best performance.
180
199
- Index encrypted fields when needed
181
200
- Monitor query performance on encrypted fields
182
201
- Use appropriate encryption algorithms
183
202
184
203
3.**Security Guidelines**
204
+
- Principle of Least Privilege: Grant only the necessary permissions to access encryption keys.
185
205
- Follow the principle of least privilege
186
206
- Encrypt only necessary fields
187
207
- Regularly audit encryption configurations
@@ -193,3 +213,4 @@ For hands-on practice with Queryable Encryption concepts, check out our [practic
193
213
## Next Steps
194
214
195
215
After implementing Queryable Encryption, you can reach the final closing phase of Additional Security Considerations and Summary.
0 commit comments