MongoDB Tip: 4.0.x encryption at rest
I just want to quickly document what to look for in the log when we have successfully enable encryption at rest for mongodb database
create keyfile
openssl rand -base64 32 > monogdb-ear-keyfile
copy the ear-keyfile into /etc
chmod 600 /etc/mongodb-ear-keyfile
mongod --port 17017 --dbpath /data/earTest/ --logpath /data/earTest/ear.log --enableEncryption --encryptionKeyFile /data/earTest/mongodb-ear-keyfile --fork
check the log after mongod is started
If you see this line, then your mongod has successfully launched in encryption at rest mode
2019-08-05T09:48:12.555-0400 I STORAGE [initandlisten] Encryption key manager initialized with key file: /etc/monogdb-ear-key
Comments
Post a Comment