Home DevOps LDAP Authentication With Gitlab Server Using Active Directory

LDAP Authentication With Gitlab Server Using Active Directory

ldap with AD gitlab

LDAP Authentication With Gitlab Server

LDAP Authentication with gitlab, When you’re worried about the security on git-lab server. It’s a good idea to authenticate the users using the ldap server. So, Nobody can login to your git-lab server until their account exists on the AD server.

Check Out : Install Gitlab

Note : You must have LDAP Server configured and both server should be communicated to each other.

Gitlab Provides you to Authenticate user with AD Server. Once you done it. You won’t see admin user because by default everyone will be Admin privileges before integrate this with AD. So You will have to make any user to admin by command line.

Check Gitlab Server Status

gitlab-ctl status

Create a Organisational Unit in AD server For Gitlab Server

Under OU IT, I have created a user “git” & “panki” and created a password for both the users.

Check Out How To Disable Signup On Gitlab

Go the vim /etc/gitlab/gitlab.rb file and look for ldap

You must have OU, CN, DC, User & password Values to accomplish this work.

As you can see i have these all defined in the below images.

Once you done with these settings then do not forget to run the below command otherwise changes will not be done.

Check OutRedirection HTTP To HTTPS

gitlab-ctl reconfigure

After these configured, You can check your settings are correct with ldap

gitlab-rake gitlab:ldap:check

You will see the output like this it means your gitlab server is communicating with Ldap Server.

If you do not see any user here it means you need to check your settings again.

Check Out : Check Logs In Git

Go to your Gitlab Server and try to login with AD user.

Now see i’m able to login with “Panki”  User in gitlab server

YouTube LinkLDAP authentication GITLAB

You’re done

Leave a Reply

Notify of