MongoDB Questions and Answers – Security Checklist

This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Security Checklist”.

1. Use __________ to encrypt communication between mongod and mongos components of a MongoDB client as well as between all applications and MongoDB.
a) SSD
b) TLS
c) MEAN
d) None of the mentioned
View Answer

Answer: b
Explanation: Create roles that define the exact access a set of users needs.

2. With ___________ enabled, MongoDB forces all clients to identify themselves before granting access to the server.
a) access
b) authentication
c) authorization
d) all of the mentioned
View Answer

Answer: b
Explanation: KDC uses the client’s secret and the server’s secret to construct the ticket which allows the client and server to mutually authenticate each other, while keeping the secrets hidden.

3. ___________ allows administrators to define and limit the resources and operations that a user can access.
a) Access
b) Authentication
c) Authorization
d) All of the mentioned
View Answer

Answer: c
Explanation: Using authentication and authorization is a key part of a complete security strategy.

advertisement
advertisement

4. Point out the wrong statement.
a) User principal names have the form: <userpwd>@<KERBEROS PRINCIPAL>
b) For MongoDB, the <service> defaults to mongodb
c) Every MongoDB mongod and mongos instance must have an associated service principal
d) All of the mentioned
View Answer

Answer: b
Explanation: User principal names have the form: <userpwd>@<KERBEROS PRINCIPAL>.

5. Use the __________ option to ensure that MongoDB listens for connections from applications on configured addresses.
a) bind_ipadd
b) bind_ip
c) bind_service
d) none of the mentioned
View Answer

Answer: b
Explanation: For a geographically distributed replica sets, ensure that the majority of the set’s mongod instances reside in the primary site.

6. To generate pseudo-random data to use for a keyfile, issue the following __________ command.
a) openhss
b) openssd
c) openssl
d) all of the mentioned
View Answer

Answer: c
Explanation: Always ensure that the password stored in the key file is both long and contains a high amount of entropy. Using openssl in this manner helps generate such a key.

7. _____________ is used to initiate relica member set.
a) rs.rep()
b) rs.init()
c) rs.initiate()
d) none of the mentioned
View Answer

Answer: c
Explanation: MongoDB initiates a set that consists of the current member and that uses the default replica set configuration.
advertisement

8. Which of the following is used to display the replica set configuration object?
a) rs.config
b) rs.conf
c) rs.confrepl
d) none of the mentioned
View Answer

Answer: b
Explanation: rs.conf() returns a document that contains the current replica set configuration.

9. MongoDB supports the execution of JavaScript code for certain server-side operations like ____________
a) where
b) group
c) mapreduce
d) all of the mentioned
View Answer

Answer: d
Explanation: If you do not use these operations, disable server-side scripting by using the –noscripting option on the command line.

advertisement

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Books in MongoDB.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.