加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

如何在OpenLDAP中设置size.pr?

发布时间:2020-12-15 18:30:16 所属栏目:安全 来源:网络整理
导读:我认为我的一个LDAP客户端在OpenLDAP中达到了分页限制.客户端看到的具体错误是以下 Java事物: REASON: Caught exception running LDAP sync. [LDAP: error code 2 - paged results cookie is invalid]; nested exception is javax.naming.CommunicationExce
我认为我的一个LDAP客户端在OpenLDAP中达到了分页限制.客户端看到的具体错误是以下 Java事物:
REASON: Caught exception running LDAP sync. 
[LDAP: error code 2 - paged results cookie is invalid]; 
nested exception is javax.naming.CommunicationException: 
[LDAP: error code 2 - paged results cookie is invalid]; 
remaining name 'dc=example,dc=com'

谷歌搜索该错误引发了对LDAP分页和相关限制的讨论.该文档在OpenLDAP limits中提到了olcSizeLimit和size.pr.

我可以使用这个ldif将我的olcSizeLimit从500改为-1:

dn: cn=config
changetype: modify
replace: olcSizeLimit
olcSizeLimit: -1

不幸的是,我的客户仍然看到它的分页问题.

size.pr是slapd.conf设置,而我的OpenLDAP使用slapd.d.在LDAP模式中浏览后,我发现olcDbClientPr被描述为’PagedResults handling’.此外,这是在OpenLDAP source code中描述的方式:

{ "client-pr","accept-unsolicited|disable|<size>",2,ARG_MAGIC|LDAP_BACK_CFG_CLIENT_PR,meta_back_cf_gen,"( OLcfgDbAt:3.111 "
        "NAME 'olcDbClientPr' "
        "DESC 'PagedResults handling' "
        "SYNTAX OMsDirectoryString "
        "SINGLE-VALUE )",NULL,NULL },

假设olcDbClientPr与size.pr相同,我该如何设置它?

我试过这个:

dn: cn=config
changetype: modify
replace: olcDbClientPr
olcDbClientPr: -1

它抛出此错误:

modifying entry "cn=config"
ldap_modify: Object class violation (65)
    additional info: attribute 'olcDbClientPr' not allowed

如果它是相关的,这里是我的cn = config目录的内容:

# ls /etc/openldap/slapd.d/cn=config/
cn=module{0}.ldif  olcDatabase={0}config.ldif     olcDatabase={1}hdb.ldif
cn=schema          olcDatabase={-1}frontend.ldif  olcDatabase={1}monitor.ldif
cn=schema.ldif     olcDatabase={1}hdb
size.pr是a,每个数据库(和dn / group scopable),olcLimits选项.您可能还对全局olcSizeLimit选项感兴趣.

来自slapd-config(5):

olcSizeLimit: size[.{soft|hard|unchecked}]= […]
Specify the maximum number of entries to return from a search operation. The default size limit is 500. Use unlimited to specify no limits. The second format allows a fine grain setting of the size limits. Extra args can be added in the same value or as additional values. See olcLimits for an explanation of the different flags.

olcDbClientPr与size.pr不同.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读