LDAP 服务器,这是我的基础 dn [英] LDAP server which is my base dn

查看:16
本文介绍了LDAP 服务器,这是我的基础 dn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试使用我的 ldap 测试服务器来验证 openca 中的用户.

Hello I'm trying to use my ldap test server in order to authenticate users in openca.

我目前正在通过 phpldapadmin 连接:

I'm currently connecting through phpldapadmin with :

登录 DN:cn=a​​dmin,dc=example,dc=com
密码:mypass

Login DN : cn=admin,dc=example,dc=com
Password : mypass

但是在 openca 上出了点问题...在 datasources.xml 我找到了 ldap 配置的设置,它要求

but on openca something is going wrong... in datasources.xml I found the settings of the ldap configuration and it asks for

<name>basedn</name>

哪个是我的基础?我已经试过了

which is the basedn for me ? I already tried

cn=admin,dc=example,dc=com

dc=example,dc=com

我也可以使用 LDAP Admin explorer 连接到我的 ldap.

I can connect to my ldap with LDAP Admin explorer too.

谢谢!

推荐答案

基础 dn 为 dc=example,dc=com.

我不了解openca,但我会尝试这个答案,因为到目前为止你的流量很少.

I don't know about openca, but I will try this answer since you got very little traffic so far.

基本 dn 是服务器搜索用户的起点.所以我会尝试简单地使用 admin 作为登录名.

A base dn is the point from where a server will search for users. So I would try to simply use admin as a login name.

如果 openca 的行为与大多数支持 ldap 的应用程序一样,那么将会发生以下情况:

If openca behaves like most ldap aware applications, this is what is going to happen :

  1. 用户 admin 的 ldap 搜索将由服务器从基本 dn (dc=example,dc=com) 开始.
  2. 找到用户后,将使用完整的 dn (cn=admin,dc=example,dc=com) 与提供的密码绑定.
  3. ldap 服务器将对密码进行哈希处理并与存储的哈希值进行比较.如果匹配,您就进入了.
  1. An ldap search for the user admin will be done by the server starting at the base dn (dc=example,dc=com).
  2. When the user is found, the full dn (cn=admin,dc=example,dc=com) will be used to bind with the supplied password.
  3. The ldap server will hash the password and compare with the stored hash value. If it matches, you're in.

正确完成第 1 步是最难的部分,但主要是因为我们不经常这样做.您必须在配置文件中注意以下事项:

Getting step 1 right is the hardest part, but mostly because we don't get to do it often. Things you have to look out for in your configuraiton file are :

  • 您的应用程序将用来绑定到 ldap 服务器的 dn.这发生在应用程序启动时,在任何用户进行身份验证之前.您必须提供完整的 dn,可能类似于 cn=admin,dc=example,dc=com.
  • 身份验证方法.它通常是简单绑定".
  • 用户搜索过滤器.查看 admin 用户的名为 objectClass 的属性.它将是 inetOrgPersonuser.会有其他类似top的,你可以忽略它们.在您的 openca 配置中,应该有一个类似 (objectClass=inetOrgPerson) 的字符串.不管是什么,请确保它与您的管理员用户的对象类匹配.您可以使用此搜索过滤器 (|(objectClass=inetOrgPerson)(objectClass=user)) 指定两个对象类.
  • The dn your application will use to bind to the ldap server. This happens at application startup, before any user comes to authenticate. You will have to supply a full dn, maybe something like cn=admin,dc=example,dc=com.
  • The authentication method. It is usually a "simple bind".
  • The user search filter. Look at the attribute named objectClass for your admin user. It will be either inetOrgPerson or user. There will be others like top, you can ignore them. In your openca configuration, there should be a string like (objectClass=inetOrgPerson). Whatever it is, make sure it matches your admin user's object Class. You can specify two object class with this search filter (|(objectClass=inetOrgPerson)(objectClass=user)).

下载 LDAP 浏览器,例如 Apache 的 Directory Studio.使用您的应用程序的凭据进行连接,因此您将看到您的应用程序看到的内容.

Download an LDAP Browser, such as Apache's Directory Studio. Connect using your application's credentials, so you will see what your application sees.

这篇关于LDAP 服务器,这是我的基础 dn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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