Gitlab 修改ldap认证

时间:2023-03-08 22:29:44

1. 备份数据

Gitlab 修改ldap认证

2. 修改配置

使用自己搭建的openldap

Gitlab 修改ldap认证

使用用户中心的openldap

Gitlab 修改ldap认证

说明:base属性执行所有员工,user_filter属性主要用来实现分组功能。上面的配置是只有ldap中的gitlab分组中的用户可以登录GitLab。

3、重新加载GitLab配置;

# sudo gitlab-ctl reconfigure

4、重启GitLab服务

关闭命令如下

# sudo gitlab-ctl stop unicorn
# sudo gitlab-ctl stop sidekiq
# sudo gitlab-ctl stop nginx

启动命令如下

# sudo gitlab-ctl start unicorn
# sudo gitlab-ctl start sidekiq
# sudo gitlab-ctl start nginx

参考文档:

1、http://czmmiao.iteye.com/blog/1561597 LDAP服务原理详解(原创);

2、http://www.live-in.org/archives/1731.html CentOS Linux安装OpenLDAP服务器;

3、https://forums.opensuse.org/showthread.php/425183-OpenLDAP-2-4-Overlays-Missing Thread: OpenLDAP 2.4 - Overlays Missing?

4、https://technicalnotes.wordpress.com/2014/04/19/openldap-setup-with-memberof-overlay/ openldap setup with memberof overlay;

5、https://docs.gitlab.com/ee/administration/auth/ldap.html;

6、http://www.openldap.org/lists/openldap-software/200308/msg00073.html RE: answer? groupOfNames vs groupOfUniqueNames;

7、https://blog.****.net/tongdao/article/details/52538365