MongoDB security is a critical aspect of database administration, ensuring that data is protected from unauthorized access, breaches, and other vulnerabilities. MongoDB provides several built-in security features, including authentication, authorization, encryption, and auditing.
These MCQs cover fundamental and advanced concepts of MongoDB security, which are frequently tested in technical interviews.
1.) Which of the following is a MongoDB security feature?
2.) What is the default authentication mechanism in MongoDB?
3.) Which command is used to create a user in MongoDB?
4.) What is the purpose of roles in MongoDB?
5.) Which role provides full administrative access to a MongoDB database?
6.) What is the purpose of the db.grantRolesToUser() command?
7.) Which of the following is true about MongoDB encryption?
8.) Which command is used to enable SSL/TLS in MongoDB?
9.) What is the purpose of the auditLog in MongoDB?
10.) Which command is used to enable auditing in MongoDB?