我没有成功使用Redmine进行LDAP身份验证。以下是对我所做的事情的描述:
我在Centos 6.7上安装了Bitnami Redmine并尝试在MS Windows服务器2012上对AD进行身份验证。
Environment: Redmine version 3.1.1.stable
Ruby version 2.0.0-p647 (2015-08-18) [x86_64-linux]
Rails version 4.2.4
Environment production
Database adapter Mysql2
SCM:
Subversion 1.6.11
Git 1.7.1
Filesystem
Redmine plugins:
no plugin installed
这是我在Redmine上的LDAP配置:
Name: geo-AD
Host: geo-dc.geo.net
Port 389 LDAPS: No
User: ldapuser
DN Base: DC=geo-dc,DC=geo,DC=net
LDAP filter: (objectClass=*)
on the fly: yes
Connection attribute: sAMAccontName
Name: givenName
Surname: sn
Mail: mail
测试工作正常,但是当我尝试进行身份验证时,我总是得到
密码无效
我使用Wireshark跟踪了身份验证阶段,并且我已经看到了以下内容:
redmine主机向AD服务器发出请求,要求提供以下属性:
AD服务器回答"没有这样的对象"并且身份验证停止。我已从LDAP配置窗口中删除了givenName
,sn
和mail
,但DN的请求仍然存在并导致失败。
我已检查过AD架构,并且没有名为" dn"的属性。
任何想法为什么Redmine在身份验证期间要求这个以及是否有办法改变这种行为?
以下是LDAP查询和LDAP响应。
192.168.1.244
是使用Redmine的Centos服务器,192.168.1.240
是带有AD的MS Server 2012。
No. Time Source Destination Protocol Length Info
72 28.269126319 192.168.1.244 192.168.1.240 LDAP 237 searchRequest(2) "DC=geo-dc,DC=geo,DC=net" wholeSubtree
第72帧:线路上的237个字节(1896位),接口0上捕获的237个字节(1896位)
轻量级目录访问协议
LDAPMessage searchRequest(2) "DC=geo-dc,DC=geo,DC=net" wholeSubtree
messageID: 2
protocolOp: searchRequest (3)
searchRequest
baseObject: DC=geo-dc,DC=geo,DC=net
scope: wholeSubtree (2)
derefAliases: neverDerefAliases (0)
sizeLimit: 0
timeLimit: 0
typesOnly: False
Filter: (&(&(objectClass=*)(objectClass=*))
(sAMAccountName=mlavagna))
filter: and (0)
and: (&(&(objectClass=*)(objectClass=*))
(sAMAccountName=mlavagna))
and: 3 items
Filter: (objectClass=*)
and item: present (7)
present: objectClass
Filter: (objectClass=*)
and item: present (7)
present: objectClass
Filter: (sAMAccountName=mlavagna)
and item: equalityMatch (3)
equalityMatch
attributeDesc: sAMAccountName
assertionValue: mlavagna
attributes: 4 items
AttributeDescription: dn
AttributeDescription: givenName
AttributeDescription: sn
AttributeDescription: mail
[Response In: 73]
controls: 1 item
Control
controlType: 1.2.840.113556.1.4.319 (pagedResultsControl)
criticality: False
SearchControlValue
size: 126
cookie: <MISSING>
没有。时间源目标协议
74 28.269493413 192.168.1.244 192.168.1.240 TCP
轻量级目录访问协议
LDAPMessage searchResDone(2) noSuchObject (0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best match of:
'DC=geo,DC=net'
) [0 results]
messageID: 2
protocolOp: searchResDone (5)
searchResDone
resultCode: noSuchObject (32)
matchedDN: DC=geo,DC=net
errorMessage: 0000208D: NameErr: DSID-03100238, problem 2001
(NO_OBJECT), data 0, best match of:\n\t'DC=geo,DC=net'\n
[Response To: 72]
[Time: 0.000264030 seconds]
答案 0 :(得分:0)
你有&#34; ou&#34; LDAP中的(组织单位)?例如,如果您的用户位于ou = People下,则您的redmine DN Base可能如下所示:
DN Base: ou=People,DC=geo-dc,DC=geo,DC=net