MongoDB YAML "Unrecognized option: security.ldap.servers"



我在Linux CentOS 7上运行MongoDB v.4.4.0。为了安全和授权,我在为设置YAML配置文件时遇到了问题。当我有下面的配置文件时,我只收到一个错误,说";无法识别的选项:security.ldap.servers;。我的配置出了什么问题?

systemLog:
destination: file
path: "/home/mongo/mongodb/logs/mongod.log"
logAppend: true
storage:
dbPath: "/home/mongo/mongodb/data/db"
net:
bindIp: localhost, 127.0.0.1
port: 27017
security:
#  authorization: enabled
ldap:
servers: "ldap"
bind:
queryUser: user
queryPassword: pass
transportSecurity: none
userToDNMapping: '[{match: "(.+)", ldapQuery: "o=int,c=com?uid?sub?userPrincipalName={0}@ldap.xxx.com"}]'
authz:
queryTemplate: '{USER}?memberOf?base'
setParameter:
authenticationMechanisms: 'PLAIN,SCRAM-SHA-1'

感谢

您收到该错误是因为security.ldap.servers仅在MongoDB Enterprise中可用。请参阅此处的文档部分(例如security.ldap.servers(。我猜你正在社区版中试用。然而,我发现了一些有用的文档,其中介绍了免费、兼容和使用企业级功能替换MongoDB社区版。我还没有亲自尝试过。此外,您还可以对此进行了解。感谢

最新更新