28. Which of the following applies to the localhost exception? Choose the best answer:
题目选项
- A.You need to use the default mongod password to create the first user on the mongod.
- B.You can bypass authorization any time you connect to MongoDB via localhost
- C.You can only create the first user prior to enabling authentication.
- D.You can create the first user via localhost after enabling authorization but prior to any other user being created.
- E.After turning on authentication, but prior to enabling authorization, you may create a user.
答案置信度:高
正确答案:D
解析语言:中文
localhost exception 的准确定义是:已启用 authorization 但集群中还没有任何用户时,可以只从本机(localhost)连接创建第一个用户(通常是 admin 库的管理员)。它不是随时可用的授权后门(B 错),不需要什么默认密码(C 错),也不要求在开启认证之前创建(D 错)。