0

我刚刚获得了 Gitblit 的最新版本 1.0 可用在这里

我正在尝试集成身份验证的 LDAP 方法。因为我认为我的 ldap 不是典型的,所以我对这些术语匹配的内容有疑问。

到目前为止,我一直在关注有限的资源(因为 1.0 刚出来)和 google 组。

但是,我什至无法连接我的服务器。

我将粘贴 Gitblit 进行身份验证所需的字段,然后我将粘贴我的 ldap 中列出的一些相关字段。

我以前在 ldap 结构上遇到过问题,但我想知道是不是只有我一个人。

谢谢!

内部:gitblit.properties

realm.ldap.server = http://127.0.0.1 #for this purpose

# Login username for LDAP searches.
  realm.ldap.username = username

# Login password for LDAP searches.
  realm.ldap.password = password

# Root node for all LDAP users
  realm.ldap.accountBase = CN=Users,DC=rem,DC=pri

# Filter criteria for LDAP users
# Query pattern to use when searching for a user account. This may be any valid 
# LDAP query expression, including the standard (&) and (|) operators.
#    ${username} - The text entered as the user name
  realm.ldap.accountPattern = (&(objectClass=person)(sAMAccountName=${jsmith}))

# Root node for all LDAP groups to be used as Gitblit Teams
# This is the root node from which subtree team searches will begin.
  realm.ldap.groupBase = 

# Filter criteria for LDAP groups
# Variables may be injected via the ${variableName} syntax.
# Recognized variables are:
#    ${username} - The text entered as the user name
#    ${dn} - The Distinguished Name of the user logged in
# All attributes from the LDAP User record are available. For example, if a user
# has an attribute "fullName" set to "John", "(fn=${fullName})" will be 
# translated to "(fn=John)".
  realm.ldap.groupMemberPattern = (&(objectClass=group))

这是我的目录列表的图片(显然标识的东西已被删除)

ldap 目录

4

1 回答 1

0

我对 Gitblit 一无所知,但不应该

realm.ldap.accountPattern = (&(objectClass=person)(sAMAccountName=${jsmith}))

realm.ldap.accountPattern = (&(objectClass=person)(sAMAccountName=${username}))

用于基于变量的搜索,或

realm.ldap.accountPattern = (&(objectClass=person)(sAMAccountName=jsmith))

如果您试图对搜索进行硬编码(用于测试)?

于 2012-07-25T18:09:59.740 回答