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
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
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
Explanation: Using authentication and authorization is a key part of a complete security strategy.
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
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
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
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
Explanation: MongoDB initiates a set that consists of the current member and that uses the default replica set configuration.
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
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
Explanation: If you do not use these operations, disable server-side scripting by using the –noscripting option on the command line.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Check Information Technology Books
- Apply for Programming Internship
- Practice Programming MCQs
- Check MongoDB Books