Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #9481

Closed
Open
Created Jul 24, 2015 by Administrator@rootOwner

Could not authorize you from Ldapmain because "Stack level too deep".

Created by: luzhongyang

Sign in throw ldap result image

The gitlab config in /etc/gitlab/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: '127.0.0.1'
    port: 389
    uid: 'cn'
    method: 'plain' # "tls" or "ssl" or "plain"
    bind_dn:  ''
    password: 'admin'
    active_directory: false
    allow_username_or_email_login: false
    block_auto_created_users: false
    base: 'dc=mydomain,dc=net'
    user_filter: '(objectClass=*)'
    ## EE only
    group_base: ''
    admin_group: ''
    sync_ssh_keys: false
EOS

The openldap config:

database        bdb
suffix          "dc=mydomain,dc=net"
rootdn          "cn=Manager,dc=mydomain,dc=net"

rootpw  admin

directory       /usr/local/openldap/var/openldap-data

index   objectClass     eq

The LDAP log when sign in gitlab throw ldap:

55b1f215 @(#) $OpenLDAP: slapd 2.4.41 (Jul 23 2015 12:08:48) $
    root@iZ25r9re2foZ:/root/openldap-2.4.41/servers/slapd
55b1f215 bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
55b1f215 slapd starting
55b1f21d conn=1000 fd=12 ACCEPT from IP=192.168.1.159:2406 (IP=0.0.0.0:389)
55b1f21d conn=1000 op=0 BIND dn="" method=128
55b1f21d connection_input: conn=1000 deferring operation: binding
55b1f21d conn=1000 op=0 RESULT tag=97 err=49 text=
55b1f21d conn=1000 op=1 SRCH base="" scope=0 deref=0 filter="(objectClass=*)"
55b1f21d conn=1000 op=1 SRCH attr=altServer namingContexts supportedCapabilities supportedControl supportedExtension supportedFeatures supportedLdapVersion supportedSASLMechanisms
55b1f21d conn=1000 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
55b1f21d conn=1000 op=2 SRCH base="dc=mydomain,dc=net" scope=2 deref=0 filter="(cn=jiayanni)"
55b1f21d <= bdb_equality_candidates: (cn) not indexed
55b1f21d conn=1000 op=3 BIND dn="cn=jiayanni,dc=mydomain,dc=net" method=128
55b1f21d conn=1000 op=3 BIND dn="cn=jiayanni,dc=mydomain,dc=net" mech=SIMPLE ssf=0
55b1f21d conn=1000 op=2 SEARCH RESULT tag=101 err=0 nentries=1 text=
55b1f21d conn=1000 op=3 RESULT tag=97 err=0 text=
55b1f21d conn=1000 fd=12 closed (connection lost)
Started GET "/users/sign_in" for 192.168.1.92 at 2015-07-24 15:48:38 +0800
Processing by SessionsController#new as HTML
Completed 200 OK in 21ms (Views: 7.8ms | ActiveRecord: 2.1ms)
Started POST "/users/auth/ldapmain/callback" for 192.168.1.92 at 2015-07-24 16:06:53 +0800
Processing by OmniauthCallbacksController#ldapmain as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "username"=>"jiayanni", "password"=>"[FILTERED]"}
Completed 500 Internal Server Error in 25ms (ActiveRecord: 3.0ms)
Processing by OmniauthCallbacksController#failure as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "username"=>"jiayanni", "password"=>"[FILTERED]"}
Redirected to http://192.168.1.159/users/sign_in
Completed 302 Found in 8ms (ActiveRecord: 0.2ms)
Started GET "/users/sign_in" for 192.168.1.92 at 2015-07-24 16:06:53 +0800
Processing by SessionsController#new as HTML
Completed 200 OK in 21ms (Views: 8.3ms | ActiveRecord: 2.0ms)
Assignee
Assign to
Time tracking