MongoDB DBA · Question 150 · Single choice

34. You are requested to create a database user that is able to perform the following set of tasks: grant roles to other database users create new database users create custom roles for specific users Taking into account the principle of least privilege in the creation of users, which built-in role should be granted to such user? Choose the best answer:

Answer options

  1. A.
    userAdmin
  2. B.
    root
  3. C.
    clusterAdmin
  4. D.
    dbAdmin
  5. E.
    readWrite

Answer confidence: High

Correct answer: A

Explanation language: Chinese

题目要求的三项能力(给其他用户授予角色、创建用户、创建自定义角色)正对应 userAdmin 的 grantRole/createUser/createRole 权限,符合最小权限原则。root、clusterAdmin 权限过大;dbAdmin 只负责集合、索引、统计等库维护操作;readWrite 只能读写数据,都不具备用户/角色管理能力。

Papers containing this question

This question appears in 3 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗