首页 > 解决方案 > 在 OpenLDAP 中禁用分页搜索

问题描述

我正在使用osixia/openldap进行测试,并且我想禁用分页搜索结果。

根据文档,应该可以使用该olcSizeLimit属性在全局级别上执行此操作。

这是我的 LDIF 文件(安装在 /container/service/slapd/assets/config/bootstrap/ldif/custom/disable-paging.ldif 中):

dn: cn=config
changeType: modify
add: olcSizeLimit
olcSizeLimit: size.prtotal=disabled

容器使用此 LDIF 文件正确启动:

sample-ldap-main_1  | Processing file /container/run/service/slapd/assets/config/bootstrap/ldif/custom/disable-paging.ldif
sample-ldap-main_1  | modifying entry "cn=config"

但是,当我尝试使用 Simple Paged Results 控件进行搜索时,搜索成功且没有任何错误。

我遇到了一个关于这个主题的电子邮件线程,但它似乎并没有导致任何地方。有没有人以前做过这个工作?

标签: ldapopenldap

解决方案


这种方法实际上有效,当我尝试以编程方式运行分页搜索(go-ldap)时,我收到以下错误:

LDAP Result Code 11 "Admin Limit Exceeded": pagedResults control not allowed

我试图用 Apache Directory Studio 测试这个配置,由于某种原因,它在分页搜索中没有失败。我怀疑它可能具有“方便”功能,如果分页搜索失败,它会自动忽略搜索控件并重试?


推荐阅读