Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenLDAP用户无法认证 #3

Closed
PostgreSQL1989 opened this issue Dec 25, 2018 · 2 comments
Closed

OpenLDAP用户无法认证 #3

PostgreSQL1989 opened this issue Dec 25, 2018 · 2 comments

Comments

@PostgreSQL1989
Copy link

PostgreSQL1989 commented Dec 25, 2018

环境信息:
OS: CentOS Linux release 7.6.1810 (Core)
LDAP: openldap-servers-2.4.44-15.el7_5.x86_64
jdk: Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
tomcat: apache-tomcat-8.0.36

OpenLDAP配置如下:
suffix "dc=limeng,dc=org"
rootdn "cn=openldap,dc=limeng,dc=org"
举个例子:
DN: cn=User,ou=Group,dc=limeng,dc=org
DN: cn=guiqing,cn=User,ou=Group,dc=limeng,dc=org

server.properties配置文件中的LDAP配置如下:
# ldap配置,建议使用apacheDS,用户dn:cn=user1,ou=users,ou=system
ldapUrl=ldap://ldap.duozheng.org:389
ldapBase=
ldapUserDn=cn=User,ou=Group
ldapPwd=rootpw

yapi可以通过LDAP登录,相关配置信息如下:
"ldapLogin": {
"enable": true,
"server": "ldap://ldap.duozheng.org:389",
"baseDn": "cn=openldap,dc=limeng,dc=org",
"bindPassword": "rootpw",
"searchDn": "cn=User,ou=Group,dc=limeng,dc=org",
"searchStandard": "cn",
"emailPostfix": "@邮箱后缀",
"emailKey": "mail",
"usernameKey": "name"
}

报错信息:
LDAP用户无法登录,web报错"登录凭证错误!"
image

tomcat日志如下:
image

@ixrjog
Copy link
Owner

ixrjog commented Dec 25, 2018

下周会提交一个新版本,增强ldap配置

#ldap配置,建议使用apacheDS,用户dn:cn=user1,ou=users,ou=system
ldap.url=ldap://ldap.server.com:10389
ldap.base.dn=ou=system
# 管理员账户,用户账户管理
# apacheDS 可将用户(opsadmin )加入 cn=Administrators,ou=groups,ou=system 用户组
# ldap.manager.dn=cn=opsadmin,ou=users,ou=system
ldap.manager.dn=uid=admin,ou=system
ldap.manager.passwd=123456
ldap.group.dn=ou=groups
ldap.user.dn=ou=users
ldap.user.id=cn
ldap.user.object=inetorgperson
ldap.group.object=groupOfUniqueNames
ldap.group.member=uniqueMember

@ixrjog
Copy link
Owner

ixrjog commented Feb 26, 2019

已提交新版本

@ixrjog ixrjog closed this as completed Feb 26, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants