Homework 2.5 - How to check encrypted data?

I finished and passed this lab, but I would like to know other than doing a “ps -ef | grep mongo” is there a command line inside mongo shell where I can verify the storage is encrypted?

As you know, encryption is enabled via the mongod options during instantiation. You can check what options where passed using one of these two methods:

  • db.serverCmdLineOpts()

  • use local
    db.startup_log.find().pretty()

… apply filters to drill down to the relevant section. Both are quite handy commands for discovering a lot of DB information.

NB: You might want to link your post to the Security course.

2 Likes

mongod --dbpath C:\a --wiredTigerCollectionBlockCompressor none --wiredTigerDirectoryForIndexes --port 12000

And in the second window:
use haf
db.hafxxx.insertOne({ASSSSSSSSSSSSSSSSK:“AHAHAAHAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAA”});

Notepad:
C:\a\collection\7-something,wt

Here were are - naked, no compression and encryption at all.
And now the same drill with encryption enabled.

Thanks! 007, these commands are very handy indeed.