MongoDB for Developers with Python Transcripts
Chapter: Deploying MongoDB in production (and playing it safe)
Lecture: Concept: Adding encrypted communication for MongoDB
0:01 Let's review how we added encryption.
0:03 Somehow we got a hold of an ssl certificate and a private key
0:06 so the way we did this is we just went into the location
0:10 where we typically store those analytics
0:13 and we ran open ssl to generate a self signed certificate,
0:16 the only change that I made here from the recommendation from MongoDB
0:20 is I added, I made it a ten year certificate,
0:23 because look as long as it's not trusted let's not trust it for a long time.
0:26 Anyway, we did that and then we combined the private key and the certificate
0:30 into this pem file, which we point MongoDB at
0:33 we restarted, I first paused on the left, go to the right,
0:36 we added this ssl section, we added the mode to require ssl
0:39 and here's the file to do that, and then we were able to connect to MongoDB
0:44 but only if we say --allow invalid certificates and --ssl,
0:49 all of this is documented in that url below
0:52 manual, tutorial, configure -ssl, so you can check that out and like I said,
0:56 copy the details from there, not by typing them in from watching me do it.
1:00 Alright, so a really nice step and important step to enabling ssl
1:04 and secure communication on our MongoDB server.