【问题标题】:Gitlab (AWS) authentication using on-premise LDAP (Win 2008 R2)使用本地 LDAP 的 Gitlab (AWS) 身份验证 (Win 2008 R2)
【发布时间】:2016-01-17 21:13:37
【问题描述】:

我已安装 GitLab Omnibus Community Edition 8.0.2 用于评估目的。我正在尝试将 Gitlab(AWS 上的 Linux AMI)与我们在 Win 2008 R2 上运行的本地 LDAP 服务器连接起来。但是,我无法这样做。我收到以下错误(无法从 Ldapmain 授权您,因为“凭据无效”):

这是我在 gitlab.rb 中用于 LDAP 的配置

 gitlab_rails['ldap_enabled'] = true
 gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' # remember to close this block with 'EOS' below
 main: # 'main' is the GitLab 'provider ID' of this LDAP server
     label: 'LDAP'
     host: 'XX.YYY.Z.XX'
     port: 389
     uid: 'sAMAccountName'
     method: 'plain' # "tls" or "ssl" or "plain"
     bind_dn: 'CN=git lab,OU=users,OU=Service Accounts,OU=corp,OU=India,OU=Users,OU=UserId&Rooms,DC=india,DC=local'
     password: 'pwd1234'
     active_directory: true
     allow_username_or_email_login: true
     base: 'CN=git lab,OU=users,OU=Service Accounts,OU=corp,OU=India,OU=Users,OU=UserId&Rooms,DC=india,DC=local'
     user_filter: ''
 EOS

有两个用户:gitlab(新创建的AD用户)和john.doe(旧AD用户)

两个用户都可以使用 ldapsearch 命令查询 所有 AD 用户,但是当我在 gitlab.rb 中使用他们各自的详细信息(一次一个)并运行 @987654324 @ 命令,它只显示关于该特定用户的信息,而不是所有用户。

之前,gitlab-rake gitlab:ldap:check 在 gitlab.rb 文件中配置我的凭据 (john.doe) 时显示来自 AD 的前 100 个结果。由于这是我的个人凭证,我要求我的 IT 团队为 GitLab 创建一个新的 AD 用户 (gitlab)。在我在 gitlab.rb 文件中配置新用户 (gitlab) 并运行 gitlab-rake gitlab:ldap:check 后,它只显示该特定用户的记录。我认为这可能是由于新创建的用户的一些权限问题,所以我在 gitlab.rb 中恢复了我的个人凭据。令人惊讶的是,现在当我运行gitlab-rake gitlab:ldap:check 时,我只为我的用户获得了一条记录,而不是我之前获得的 100 条记录。这真的很奇怪!我认为,不知何故,GitLab 正在“忘记”以前的细节。

任何帮助将不胜感激。

【问题讨论】:

    标签: amazon-web-services ldap gitlab gitlab-omnibus


    【解决方案1】:

    问题现已解决。似乎这是我使用的版本(8.0.2)中的一个错误。将其升级到 8.0.5 解决了我的问题。

    另外,对我有用的 bind_dnbase 的值是:

    bind_dn: 'CN=git lab,OU=users,OU=Service Accounts,OU=corp,OU=India,OU=Users,OU=UserId&Rooms,DC=india,DC=local'
    
    base: 'OU=users,OU=Service Accounts,OU=corp,OU=India,OU=Users,OU=UserId&Rooms,DC=india,DC=local'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-03-09
      • 2015-12-04
      • 1970-01-01
      • 1970-01-01
      • 2015-10-02
      • 2011-06-16
      • 1970-01-01
      • 2012-09-01
      相关资源
      最近更新 更多