250+ TOP MCQs on Access Control and Answers

MongoDB Multiple Choice Questions on “Access Control”.

1. If you create the user administrator before enabling access control, MongoDB disables the ________ exception.
a) localhost
b) server
c) runtime
d) none of the mentioned

Answer: a
Clarification: The localhost exception allows you to enable authorization before creating the first user in the system.

2. Point out the correct statement.
a) After you create the user administrator, the localhost exception is no longer available
b) Enabling access control on a MongoDB instance restricts access to the instance by requiring that users identify themselves when connecting
c) The mongo shell executes a number of commands at start up
d) All of the mentioned

Answer: d
Clarification: As a result, when you log in as the user administrator, you may see authentication errors from one or more commands.

3. If you use the localhost exception when deploying a new MongoDB system, the first user you create must be in the ________ database.
a) head
b) local
c) admin
d) all of the mentioned

Answer: c
Clarification: In the case of a sharded cluster, the localhost exception applies to each shard individually as well as to the cluster as a whole.

4. If you need to disable access control for any reason, restart the process with ______ setting.
a) KeyFile
b) Authentication
c) Authorization
d) All of the mentioned

Answer: a
Clarification: Login in with the user administrator’s credentials and create additional users.

5. Point out the wrong statement.
a) Authentication does not require an authentication mechanism
b) To enable authentication on a sharded cluster, you must enable authentication individually on each component of the cluster
c) The content of the key file must be the same on all cluster members
d) All of the mentioned

  250+ TOP MCQs on Replica Set Deployment Architectures and Answers

Answer: a
Clarification: Authentication requires an authentication mechanism and, in most cases, a key file.

6. The ________ client authentication allows clients to authenticate to servers with certificates rather than with a username and password.
a) x.209
b) x.509
c) x.709
d) None of the mentioned

Answer: b
Clarification: MongoDB supports x.509 certificate authentication for use with a secure TLS/SSL connection.

7. enableLocalhostAuthBypass is not available using _________ database command.
a) setParameter
b) enableParameter
c) removeParameter
d) none of the mentioned

Answer: a
Clarification: Use the setParameter option in the configuration file or the –setParameter option on the command line.

8. ______________ enables a set of internal commands useful for internal testing operations.
a) enableTestAll
b) enableTest
c) enableTestCommands
d) all of the mentioned

Answer: c
Clarification: enableTestCommands is only available when starting mongod and you cannot use setParameter to modify this parameter.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top