MongoDB DBA · 题目 146 · 多选

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:

题目选项

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

答案置信度:中

正确答案:B、C

解析语言:中文

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

所在套题

此题在题库中有 3 条记录。公开详情合并相同题干和选项;完整公开题展示置信度最高的一条记录,其他题目仅展示摘要。按套学习保留每条记录原有的答案、解析和置信度。

作者 · 作品 · 开源

作者与 MongoDB 作品

专注数据平台、MongoDB 迁移同步与云运维产品研发。

有任何 MongoDB 需求,均可联系作者。

联系作者 ↗mlhp123@outlook.com

支持作者

如果题库对您有帮助,欢迎自愿扫码打赏。

支付宝扫码打赏作者打开打赏原图 ↗