MongoDB Security Questions Answers

Connect with

MongoDB
Security is the primary concerned for all level of stakeholder in the software industry, wherther you are developer, lead, project manager, business user, CXO level.

We all know , Performance and Security both will not go hands-in-hands, you have to balance between them basis on your need , meaning that, you have to balance between how much Performance your required and how much security can be compromized. Most of the time we inclined towards one and forgot another, thats a different story all togheter. You know, when we add security in place as per your requirement, you have to pay something ( means you have to compromise performance), its not free lunch. Inspite of knowing these, most of the time we ignore. Most of the time , we think com-on yaar, will do it later point-of-time, let us focus on functionality first. We always keep focusing on functionalities of our application/software components. when something went wrong in software in a particular day , on that day we stand and regret , why we security not impemented. Any way you can do it cheers 🙂

Which of the following statements are false concerning the localhost exception?

Check all that apply:
a. The localhost exception allows you to create one user per database.
b. The localhost exception is only applicable when connected to MongoDB via the localhost network interface.
c. The localhost exception allows you to run show dbs.
d. The localhost exception is not applicable to members in a sharded cluster.

AnswerThe false statements are:

The localhost exception allows you to create one user per database.

Explaination: Key points

  1. The localhost exception only allows you to create one user. After the first user is created any other attempt to create a user (even on another database) will fail.
  2. The localhost exception allows you to run show dbs.
  3. The localhost exception only allows you to create a user. Any other command that requires authorization will fail.
  4. The localhost exception is not applicable to members in a sharded cluster.
  5. The localhost exception still applies to members of a sharded cluster (or a replica set).
  6. The true statement is:
    The localhost exception is only applicable when connected to MongoDB via the localhost network interface.

Connect with

Leave a Reply

Your email address will not be published. Required fields are marked *