GitLab을 사용하여 LDAP 인증을 설정하려고합니다 (VM의 Ubuntu 14.04 amd64에 설치된 버전 7.12.2, Omnibus 설정). gitlab.rb 파일을 다음과 같이 편집했습니다.
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: '********'
port: 389
uid: 'sAMAccountName'
method: 'plain' # "tls" or "ssl" or "plain"
bind_dn: 'CN=********,OU=********,OU=********,DC=********,DC=***'
password: '********'
active_directory: true
allow_username_or_email_login: false
block_auto_created_users: false
base: 'DC=********,DC=***'
user_filter: ''
EOS
이로 인해 "잘못된 자격 증명"으로 인해 Ldapmain으로부터 권한을 부여 할 수 없습니다. " 오류. bind_dn 변수에있는 username : "johnsmith@example.com"(사용자 이름을 기반으로하는 이메일), "John Smith"(이름) 및 "johnsmith"(username)에 대해 시도했습니다. 결과는 항상 같습니다. 내 비밀번호에 @ 기호가 있습니다. 탈출해야하는지, 어떻게해야할지 모르겠습니다.
로그는 이것을 보여줍니다 :
Started POST "/users/auth/ldapmain/callback" for 127.0.0.1 at 2015-07-22 17:15:01 -0400
Processing by OmniauthCallbacksController#failure as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "username"=>"********", "password"=>"[FILTERED]"}
Redirected to http://192.168.56.102/users/sign_in
Completed 302 Found in 14ms (ActiveRecord: 3.6ms)
Started GET "/users/sign_in" for 127.0.0.1 at 2015-07-22 17:15:01 -0400
Processing by SessionsController#new as HTML
Completed 200 OK in 20ms (Views: 8.3ms | ActiveRecord: 2.9ms)
그리고 gitlab-rake gitlab:ldap:check이것을 보여줍니다 :
Checking LDAP ...
LDAP users with access to your GitLab server (only showing the first 100 results)
Server: ldapmain
Checking LDAP ... Finished
그러나 우분투 VM (따라서 동일한 환경)에서 ldapsearch를 사용하면 많은 결과가 나타납니다.
ldapsearch -x -h ******** -D "********@********.***" -W -b "OU=********,OU=********,DC=********,DC=***" -s sub "(cn=*)" cn mail sn dn
흥미롭게도 결과의 DN은 다음과 같습니다.
dn: CN=John Smith,OU=********,OU=********,OU=********,DC=********,DC=***
즉, 추가 OU가 있습니다. 또한 ldapsearch 명령에 -s sub하위 그룹을 검색한다는 의미가 있습니다. LDAP 또는 Active Directory의 기능에 익숙하지 않습니다.
그래서 나는 내 기지에 뭔가 빠져 있다고 생각하지만 확실하지 않습니다. 사용자 필터에 문제가있을 수도 있습니다. 나는 필요한 구글링을 해왔는데, 지금까지 저를 데려 왔지만 이제는 아이디어와 해결책이 없습니다.
base이 약간 짧아 보입니다. ldapsearch 결과의 전체 경로 (모든 OU 포함)를 넣으면 어떻게됩니까?