【问题标题】:Gitlab Active Directory issues - gitlab-7.7.1_omnibusGitlab Active Directory 问题 - gitlab-7.7.1_omnibus
【发布时间】:2015-01-27 23:51:04
【问题描述】:

我在 Gitlab 上通过 LDAP 进行 Active Directory 身份验证时遇到问题。我已经使用ldapsearch 测试了凭据并绑定了 dn,并收到了没有问题的响应,但由于某种原因,当我在 gitlab 前端以 AD 用户身份登录时,我没有看到任何连接尝试。我收到错误消息“无法从 Ldapmain 授权您,因为“凭据无效”。无论我是否使用有效凭据。

我还收到来自sudo gitlab-rake gitlab:check 的以下信息:

** Invoke gitlab:ldap:check (first_time)
** Invoke environment
** Execute gitlab:ldap:check
Checking LDAP ...

LDAP users with access to your GitLab server (only showing the first 100 results)
Server: ldapmain

Checking LDAP ... Finished

如果我的解释不清楚,或者您认为补充信息会有所帮助,请告诉我。我尝试四处搜索,但没有找到我的确切问题。

我的配置如下:

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
  #
  # A human-friendly name for your LDAP server. It is OK to change the label later,
  # for instance if you find out it is too large to fit on the web page.
  #
  # Example: 'Paris' or 'Acme, Ltd.'
  label: 'LDAP'

  host: 'myadserver.my.domain.net'
  port: 389
  uid: 'sAMAccountName'
  method: 'plain' # "tls" or "ssl" or "plain"
  bind_dn: 'CN=Gitlab,OU=Service Accounts,OU=Washington\, D.C.,OU=United States,OU=NA,DC=my,DC=domain,DC=net'
  password: 'mypasswrd'

  # This setting specifies if LDAP server is Active Directory LDAP server.
  # For non AD servers it skips the AD specific queries.
  # If your LDAP server is not AD, set this to false.
  active_directory: true

  # If allow_username_or_email_login is enabled, GitLab will ignore everything
  # after the first '@' in the LDAP username submitted by the user on login.
  #
  # Example:
  # - the user enters 'jane.doe@example.com' and 'p@ssw0rd' as LDAP credentials;
  # - GitLab queries the LDAP server with 'jane.doe' and 'p@ssw0rd'.
  #
  # If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to
  # disable this setting, because the userPrincipalName contains an '@'.
  allow_username_or_email_login: true

  # Base where we can search for users
  #
  #   Ex. ou=People,dc=gitlab,dc=example
  #
  base: 'OU=Washington\, D.C.,OU=United States,OU=NA,DC=my,DC=domain,DC=net'

  # Filter LDAP users
  #
  #   Format: RFC 4515 http://tools.ietf.org/search/rfc4515
  #   Ex. (employeeType=developer)
  #
  #   Note: GitLab does not support omniauth-ldap's custom filter syntax.
  #
  #user_filter: ''
EOS

【问题讨论】:

    标签: active-directory ldap gitlab


    【解决方案1】:

    当然,这是一个空白问题。请参阅下面的行:

    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
      #
      # A human-friendly name for your LDAP server. It is OK to change the label later,
      # for instance if you find out it is too large to fit on the web page.
      #
      # Example: 'Paris' or 'Acme, Ltd.'
      label: 'LDAP'
    

    【讨论】:

    • 呃,有什么区别?
    • @siride 注意main的缩进
    猜你喜欢
    • 1970-01-01
    • 2015-07-08
    • 2018-08-07
    • 2020-07-29
    • 2021-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-10
    相关资源
    最近更新 更多