mongodb - 没有 SASL 的 Mongo DB LDAP 绑定
问题描述
我试图在没有 SASLauthd 的情况下配置 mongoDB Enterprise。
基于 Mongo 文档,这似乎是一个选项,但是我遗漏了一些东西。最有可能在我的 ldap 绑定中,我不确定我错过了什么。
这是我的配置文件。
net:
bindIpAll: true
port: 27018
security:
ldap:
servers: "adldap.example.com"
bind:
queryUser: "mongouser@example.com"
queryPassword: "password"
method: "simple"
userToDNMapping:
'[
{
match: "(.+)",
ldapQuery: "OU=accounts,OU=Generic,OU=mydir,DC=example,DC=com(uid={0})"
}
]'
transportSecurity: none
setParameter:
authenticationMechanisms: PLAIN
sharding:
configDB: config-server/names
systemLog:
verbosity: 0
destination: file
path: /tmp/mongos_token.log
这是我试图匹配的 LDAP 用户
CN=mongouser,OU=accounts,OU=Generic,OU=mydir,DC=example,DC=com
这是日志语句
hard list from config server :: caused by :: command find requires authentication; will retry after 30s
2019-03-06T17:01:37.777-0500 W SHARDING [replSetDistLockPinger] pinging failed for distributed lock pinger :: caused by :: Unauthorized: command findAndModify requires authentication
2019-03-06T17:01:37.777-0500 I ACCESS [ShardRegistry] Failed to authenticate in transitionToAuth, falling back to no authentication.
2019-03-06T17:01:38.376-0500 I ASIO [ShardRegistry] Connecting to configserver1.example.com:40000
2019-03-06T17:01:38.389-0500 I ACCESS [ShardRegistry] Failed to authenticate in transitionToAuth, falling back to no authentication.
2019-03-06T17:01:39.774-0500 W SHARDING [mongosMain] Error initializing sharding state, sleeping for 2 seconds and trying again :: caused by :: Unauthorized: Error loading clusterID :: caused by :: command find requires authentication
解决方案
推荐阅读
- mysql - 如何使用mysql中的存储过程参数在表中插入多行
- google-bigquery - 没有使用标准(非旧版)将 int 转换为 date 或 date to int 的选项
- cordova - 无效的上传离子资源
- spring-integration - Spring 集成中的过滤器问题
- python - 从python中的字符串替换每个字符
- php - laravel 5.6 销毁函数
- c++ - 设置常用 cmake 配置设置的合适位置在哪里?
- javascript - framework7 组件页面不适用于真实的数据库查询
- android - D8脱糖:意外类型调整
- php - 评论通知在 laravel 中不起作用