MongoDB Questions and Answers – Authentication

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

1. Which of the following method is used for managing user?
a) db.createUser()
b) db.User()
c) db.superuser()
d) none of the mentioned
View Answer

Answer: a
Explanation: MongoDB provides the db.createUser() to add and manage user information.

2. Point out the correct statement.
a) Authentication is the process of verifying the identity of a client
b) When access control is enabled, MongoDB requires all clients to authenticate themselves first in order to determine the access for the client
c) Authentication and authorization are closely connected
d) All of the mentioned
View Answer

Answer: d
Explanation: Authentication is distinct from authorization.

3. MongoDB stores user information in the _________ collection.
a) system.allusers
b) system.users
c) system.superusers
d) system.usersnone
View Answer

Answer: b
Explanation: MongoDB stores all user information, including name, password, and the user’s database, in the system.users collection in the admin database.

advertisement
advertisement

4. Which of the following authentication method is used by default by MongoDB?
a) SCRAM-SHA-1
b) LDAP
c) MONGODB-CR
d) None of the mentioned
View Answer

Answer: a
Explanation: SCRAM-SHA-1 verifies supplied user credentials against the user’s name, password and database.

5. Point out the wrong statement.
a) Authorization determines the verified user’s access to resources and operations
b) MongoDB does not support authentication mechanisms
c) To authenticate a client in MongoDB, you must add a corresponding user to MongoDB
d) None of the mentioned
View Answer

Answer: b
Explanation: In addition to verifying the identity of a client, MongoDB can require members of replica sets and sharded clusters to authenticate their membership.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. _________ is a challenge-response mechanism that authenticates users through passwords.
a) SCRAM-SHA-1
b) LDAP
c) MONGODB-CR
d) None of the mentioned
View Answer

Answer: c
Explanation: Using key files, you can also use MONGODB-CR authentication for the internal member authentication of replica set members and sharded cluster members.

7. MongoDB supports _________ certificate authentication for use with a secure TLS/SSL connection.
a) x.590
b) x.509
c) x.950
d) All of the mentioned
View Answer

Answer: b
Explanation: To authenticate to servers, clients can use x.509 certificates instead of usernames and passwords.

advertisement

8. MongoDB __________ supports authentication using a Kerberos service.
a) Standard
b) Express
c) Enterprise
d) None of the mentioned
View Answer

Answer: c
Explanation: Kerberos is an industry standard authentication protocol for large client/server systems.

9. MongoDB Enterprise supports proxy authentication through ___________
a) SCRAM-SHA-1
b) LDAP
c) MONGODB-CR
d) None of the mentioned
View Answer

Answer: b
Explanation: MongoDB does not support LDAP authentication in mixed sharded cluster deployments that contain both version 2.4 and version 2.6 shards.

advertisement

10. Every MongoDB mongod and mongos instance (or mongod.exe or mongos.exe on Windows) must have an associated ___________
a) service replica
b) service sets
c) service principal
d) service principle
View Answer

Answer: c
Explanation: Service principal names must be reachable over the network using the fully qualified domain name (FQDN) part of its service principal name.

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Books in MongoDB.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

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.