所以 直接项目 又罢工了。我不是LDAP的专家,但是我正在尝试设置测试环境,因为该标准需要任何软件包来支持从LDAP获得证书以及DNS证书,无论该软件包实施了哪种方法。

根据 文档, ,“ 3.3.3 LDAP查询”节的规定事件顺序(用于相关性):

* Discover the Base DNs
     Branches in LDAP must be defined by a “Base DN”. The list of Base DNs that are
     provided by a LDAP directory are found by doing a LDAP Query with a NULL (i.e.
     “”) Base DN, and ObjectClass=”DN”.
* Query across the Base DN for entries where "Mail" contains the endpoint address

我正在尝试使用LDAP_*函数在PHP中实现此过程,但是它们的方式似乎行不通。显然,null与一个空字符串不同(后者对LDAP_SEARCH返回“无此类对象”错误的任何调用),而“ dn”不是对象类属性的有效值。

那么,TL; dr,是否有另一种方式匿名远程用户检索我缺少的(?)基础DNS的(列表?)?

更新:对标题进行重新命名以反映我问题的根本原因:当LDAP_* API不允许您指定“基础”范围时,请从PHP读取rootdse。

有帮助吗?

解决方案

因此,另一位文档读了我为我回答了我的问题。

显然,ldap_search(),ldap_list()和ldap_read()之间的唯一区别是范围(ldap_scope_subtree(sub),ldap_scope_onelevel(one)和ldap_scope_onelevel(一个)和ldap_scope_base(base))。因此,使用ldap_read()而不是其他将允许一个人获得rootdse。

其他提示

在里面 根DSE. 。请参阅“ NamingContexts”。

更新:

在Java:

LDAPConnection conn = new LDAPConnection(hostname,port);
SearchRequest req = new SearchRequest("",SearchScope.BASE,"(&)","+");
SearchResult result = conn.search(req);

// If the search succeeds, the result will comprise one entry,
// and that entry is the Root DSE:

dn: 
subschemaSubentry: cn=schema
namingContexts: C=us
vendorName: UnboundID Corp.
vendorVersion: UnboundID Directory Server 4.1.0.6
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top