I am running MongoDB v.4.4.0 on Linux CentOS 7. I am having trouble setting up the YAML config file for for security and authorization. When I have the below config file I only receive an error saying "Unrecognized option: security.ldap.servers". What is wrong with my config?
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'
Thanks
You received that error because security.ldap.servers is available only in MongoDB Enterprise. See the documentation section (eg security.ldap.servers) here . I guess you are trying it in community edition. However, I found some useful documentation , which says free, compatiable and drop-in replacement MongoDB Community Edition with enterprise-grade features. I didn't try it personally yet. Additionally, you may have a look into this . Thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.