2016-07-28 147 views
2

gitlabopenldapを設定して、ユーザを認証しようとしています。私はopenldapを設定しており、それはJenkinsで正常に動作しています。また、装着されている公開LDAPでGitLabを設定する

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: 'localhost' 
    port: 389 
    uid: 'uid' 
    method: 'plain' # "tls" or "ssl" or "plain" 
    bind_dn: 'cn=admin,dc=ldap,dc=com' 
    password: 'waqas' 
    active_directory: false 
    allow_username_or_email_login: true 
    #block_auto_created_users: false 
    base: 'cn=Appliance,dc=ldap,dc=com' 
    user_filter: '' 
# attributes: 
# username: ['uid', 'userid', 'sAMAccountName'] 
# email: ['mail', 'email', 'userPrincipalName'] 
# name:  'cn' 
#  first_name: 'givenName' 
#  last_name: 'sn' 
#  ## EE only 
# group_base: 'ou=W-Integrate,dc=ldap,dc=com' 
    #admin_group: 'cn=admin,dc=ldap,dc=com' 
#  sync_ssh_keys: false 
# 

EOS 

enter image description here そして、私のOpenLDAP画面撮影:しかしgitlabでそれ以下はCould not authenticate you from Ldapmain because "Invalid credentials".

gitlab.rbのconfigsがあるというエラーを与えています。私が間違っていることを誰にでも訂正することができます。

あなたのベースは、ユーザ(または inetOrgPerson、ユーザ cn=Applianceのグループ)であるべきではない
+0

ベースDNを変更するだけで動作しましたか? – VonC

+0

はい、それは魅力的なように働きます。お気遣い –

+0

\ o /、またはむしろ:9(。 – VonC

答えて

2

、それはa base dnためdc entriesに限定されるべきである:

base: 'dc=ldap,dc=com' 

これは、bind_dnから基準Aを行い結合アカウントを、異なりますユーザー:bind_dn: 'cn=admin,dc=ldap,dc=com':そこにはcnがあります。

関連する問題