MongoDB DBA · Question 252 · Multiple choice

30. Consider the following audit log message: { "atype" : "createUser", "ts" : { "$date" : "2019-02-13T12:15:37.970-0500" }, "local" : { "ip" : "127.0.0.1", "port" : 27017 }, "remote" : { "ip" : "127.0.0.1", "port" : 52111 }, "users" : [], "roles" : [], "param" : { "user" : "appuser", "db" : "admin", "roles" : [ { "role" : "readWrite", "db" : "moneyDB" } ] }, "result" : 0 } This log refers to a createUser() command run from the mongo shell. From this audit log, what else do we know about this command? Check all that apply:

Answer options

  1. A.
    The user created by this command only has access to the moneyDB database.
  2. B.
    There was no user authenticated when this command was run.
  3. C.
    The user created by this command has no password.

Answer confidence: Medium

Correct answer: A, B

Explanation language: Chinese

审计消息里的 users 与 roles 都是空数组,说明执行这条 createUser 的连接没有任何已认证用户,结合 local.ip=127.0.0.1 可判断当时用的正是 localhost exception,故 B 成立;param.roles 只授予 moneyDB 上的 readWrite,所以该用户当时只对 moneyDB 有权限,C 成立。A 错:审计日志不会暴露密码字段,无法据此判断被创建的用户有没有密码。源卷只记了 C,应补上 B。

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 ↗