Encryption at Rest and TLS in Transit
Learners will enable TLS for client connections and discuss WiredTiger encryption at rest and Atlas's built-in encrypted storage.
Two Layers of Database Encryption
Securing MongoDB data requires protection at two distinct points: encryption in transit (data moving between clients and MongoDB, or between replica set members) and encryption at rest (data stored on disk). Authentication controls who can connect, but even an authenticated user operating over an unencrypted connection exposes credentials and queries to network sniffing. Together, TLS and encryption at rest provide defence-in-depth.
TLS: Encrypting Data in Transit
TLS (Transport Layer Security) encrypts the network channel between MongoDB clients, drivers, and mongod/mongos instances. Enabling TLS prevents eavesdropping and man-in-the-middle attacks on the wire. MongoDB 4.2+ supports only TLS 1.1 and higher, with TLS 1.3 available on modern platforms. Always use TLS in any environment where network traffic could be intercepted — which includes cloud VPCs despite VPC-level isolation.
All lessons in this course
- Authentication Mechanisms: SCRAM and x.509
- Role-Based Access Control: Built-In and Custom Roles
- Encryption at Rest and TLS in Transit
- Client-Side Field Level Encryption