在没有特殊gitlab用户的情况下设置gitlab LDAP身份验证 [英] setting up gitlab LDAP-authentication without special gitlab user

查看:519
本文介绍了在没有特殊gitlab用户的情况下设置gitlab LDAP身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用我们公司的LDAP设置Gitlab作为演示.但不幸的是,我必须在gitlab.yml中输入管理员密码才能使gitlab访问LDAP服务.实际上,问题出在管理上,因为他们不想为Gitlab设置另一个帐户.有什么办法可以在不填写我自己的密码的情况下规避这一问题?有没有办法让Gitlab仅使用提供的用户凭据建立LDAP连接?

I want to set up Gitlab with our company's LDAP as a demo. But unfortunately I have to put in an admin password in gitlab.yml to make gitlab access the LDAP service. The problem actually is the administration, as they don't want to setup another account just for Gitlab. Is there any way to circumvent this without filling in my own password? Is there a way to make Gitlab establish the LDAP connection with only the provided user credentials?

除了以匿名身份登录之外,还有其他想法吗?

Any ideas beside logging in as anonymous?

此处发布.

推荐答案

我还没有尝试过,但是到目前为止,我已经根据LDAP和来自配置文件的信息对该用户帐户进行了身份验证似乎仅在您的LDAP不支持匿名绑定和搜索时才需要.

I haven't tried it yet, but from the things I've build so far authenticating against LDAP and the informations from the config-file this user-account seems only to be needed when your LDAP does not support anonymous binding and searching.

因此,我将两个条目bind_dnpassword注释掉,然后尝试是否起作用.

So I would leave the two entries bind_dn and password commented out and try whether it works or not.

更新

我已经在Gitlab中实现了LDAP-Autehntication,这非常容易.

I've implemented LDAP-Autehntication in Gitlab and it's fairly easy.

gitlab.yml文件中有一个名为ldap的部分.

In the gitlab.yml-file there is a section called ldap.

您必须在其中提供连接到LDAP的信息.似乎必须提供所有字段,似乎没有默认的后备!如果要使用匿名绑定来检索用户DN,请为bind_dnpassword提供一个空字符串.注释掉它们似乎行不通!至少我收到501错误消息.

There you have to provide the informations to connect to your LDAP. It seems that all fields have to be given, there seems to be no fallback default! If you want to use anonymous binding for retrieval of the users DN supply an empty string for bind_dn and password. Commenting them out seems not to work! At least I got a 501 Error message.

更多信息,请参见 https://github.com/patthoyts/gitlabhq/wiki /Setting-up-ldap-auth 和(虽然已过时,但仍很有帮助) https://github.com/intridea/omn​​iauth-ldap

More information can be found at https://github.com/patthoyts/gitlabhq/wiki/Setting-up-ldap-auth and (more outdated but still helpful) https://github.com/intridea/omniauth-ldap

这篇关于在没有特殊gitlab用户的情况下设置gitlab LDAP身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆