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
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
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
Explanation: MongoDB stores all user information, including name, password, and the user’s database, in the system.users collection in the admin database.
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
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
Explanation: In addition to verifying the identity of a client, MongoDB can require members of replica sets and sharded clusters to authenticate their membership.
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
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
Explanation: To authenticate to servers, clients can use x.509 certificates instead of usernames and passwords.
8. MongoDB __________ supports authentication using a Kerberos service.
a) Standard
b) Express
c) Enterprise
d) None of the mentioned
View Answer
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
Explanation: MongoDB does not support LDAP authentication in mixed sharded cluster deployments that contain both version 2.4 and version 2.6 shards.
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
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.
- Check MongoDB Books
- Check Information Technology Books
- Practice Programming MCQs
- Apply for Programming Internship