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
  • #5355

Closed
Open
Created Oct 17, 2013 by Administrator@rootOwner

LDAP user cannot clone repo, works for others with different LDAP connection string

Created by: keith9820

Gitlab 6.2 beta, with LDAP integration

User gets "Access denied. fatal: The remote end hung up unexpectedly error when attempting to clone a GitLab repo. Other users in different OUs don't have a problem.

When issued from the GitLab server, this curl request returns "false":

http://localhost//api/v3/internal/allowed?key_id=22&action=git-upload-pack&ref=_any&project=analytics/dns-website

When I change the key_id, this curl request returns "true":

http://localhost//api/v3/internal/allowed?key_id=16&action=git-upload-pack&ref=_any&project=analytics/dns-website

the [failing] user with key 22 (OU=NYC03) has this extern_uid:

CN=Keith Harris,OU=Users,OU=NYC03,OU=360i,OU=My_Company,DC=corp,DC=local

the [successful] user with key 16 (OU=DET01) has this extern_uid:

CN=Angie Semler,OU=Users,OU=DET01,OU=360i,OU=My_Company,DC=corp,DC=local

The code in lib/api/internal.rb, line# 38 is returning false because Gitlab::LDAP::User.blocked?(user.extern_uid) == true

On the GitLab server, I issued the ldapsearch command for the failing user and got a successful response;

ldapsearch -H ldap://nyc03dc01:3268 -b "CN=Keith Harris,OU=Users,OU=NYC03,OU=360i,OU=MySite,dc=corp,dc=local"
Assignee
Assign to
Time tracking