与gitblit 1.0 LDAP认证(ldap authentication with gitbl

2019-10-31 23:03发布

我刚刚得到Gitblit的最新版本1.0可以在这里找到

我试图整合认证的LDAP方法。 因为我觉得我的LDAP是非典型我在与条款匹配反对什么麻烦。

到目前为止,我一直都在有限的资源(因为1.0刚出来的时候)和谷歌群体。

但是,我甚至不能让我的服务器连接。

我将粘贴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))

这是什么我目录列表看起来像一张照片(明显识别的东西已被删除)

Answer 1:

我不知道什么Gitblit但不应该

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

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

基于可变搜索,或

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

如果你想硬代码搜索(测试)?



文章来源: ldap authentication with gitblit 1.0