My confidence in MongoDB security is shaken, and I'm hopping it will be restored with an explanation that I'm doing something wrong...
I've created MongoDB's Windows Service like this:
mongod --logpath "C:\mongoDB\logs" --logappend --dbpath "C:\mongoDB\data\db" --serviceName MongoDB --serviceDisplayName "Mongo DB" --port 27017 --auth --install
I've then created a DB and added the administration user to that DB's system.users collection.
Then I filled that DB with some random information to a test collection I've created.
Up until now, everything is great and I am able to access the DB only if I have the administrator credentials...
Now the important part...
I removed the service like this:
mongod --remove --serviceName "MongoDB"
Then I recreated the service but with no authentication like this:
mongod --logpath "C:\mongoDB\logs" --logappend --dbpath "C:\mongoDB\data\db" --serviceName MongoDB --serviceDisplayName "Mongo DB" --port 27017 --noauth --install
What amazes me is that I am now able to access the DB I've created with now authentication...
Please tell me I should have done something differently.
mongod
service but does not encrypt or change the data on disk. This is consistent with other software .. for example, setting a password in Windows does not encrypt your data either. There are solutions for encryption of sensitive data; see Securing Data in MongoDB with Gazzang. – Stennie