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

查看:12
本文介绍了在没有特殊 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 的信息.好像所有的字段都得给,好像没有fallback default!如果您想使用匿名绑定来检索用户 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天全站免登陆