身份验证不从事mongoDB群集
因此,我在8个VM上部署了一个MongoDB群集(2个配置服务器,2个碎片,每个副本和2个蒙古斯实例)。 我从命令行配置了所有内容,并决定之后配置身份验证。 为此,我编辑了config服务器和蒙古斯的/etc/mongod.conf,以使auth so so:
setParameter:
enableLocalhostAuthBypass: false
security:
authorization: enabled
然后,我重新启动了两个蒙古人实例以及蒙古人实例,但是,当我连接到蒙哥多斯时,我会收到以下警告: 数据库未启用访问控制。读写数据访问和配置是不受限制的
当我只有允许阅读的用户创建用户时,它仍然可以写入DB ... 配置文件上有错误还是我缺少某些内容?
So I have a MongoDB cluster deployed on 8 VMs (2 config servers, 2 shards with 2 replicas each and 2 mongos instances).
I configured it all from command line and decided to configure the authentication afterwards.
For that I edited the /etc/mongod.conf of the config servers and mongos to enable auth like so:
setParameter:
enableLocalhostAuthBypass: false
security:
authorization: enabled
Then I restarted both mongod instances as well as the mongos instances, however, when I connect to a mongos I get the following warning: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
And when I create a user with only permission to read it can still write to a db...
Is there an error on the configuration file or am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论