Bug 1883340

Summary: Unable to disable LDAP paging using Active Directory
Product: Red Hat OpenStack Reporter: Raildo Mascena de Sousa Filho <rmascena>
Component: openstack-keystoneAssignee: Lance Bragstad <lbragsta>
Status: CLOSED DEFERRED QA Contact: Jeremy Agee <jagee>
Severity: high Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: alee, dwilde, oblaut
Target Milestone: asyncKeywords: Triaged, ZStream
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-11 18:50:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Raildo Mascena de Sousa Filho 2020-09-28 20:33:01 UTC
Description of problem:

Keystone provides a configuration option that allows users to page LDAP responses [0].

You can disable paging by setting page_size to 0, which should return all query data from LDAP in a single response.

I have an AD server with 10,000 users and I have paging set to 1,000. I am able to list users and verified paging is actually working.

If I disable paging by setting it to 0, the request errors:

2020-09-17 21:03:46.836 45 ERROR keystone.server.flask.application raise exception.LDAPSizeLimitExceeded()
2020-09-17 21:03:46.836 45 ERROR keystone.server.flask.application keystone.exception.LDAPSizeLimitExceeded: Number of User/Group entities returned by LDAP exceeded size limit. Contact your LDAP administrator.

However, if I set page_size to 100000, the request succeeds, even though I'm requesting all 10,000 users with page sizes of 100000.

I would expect to be able to disable paging without seeing the error since I'm able to request all LDAP users with huge page sizes.

[0] https://docs.openstack.org/keystone/latest/configuration/config-options.html#ldap.page_size

Version-Release number of selected component (if applicable):
OSP16.1


How reproducible:


Steps to Reproduce:
1. Configure Active Directory as the LDAP backend on Keystone
2. Configure ldap.page_size=0 (which means that the paging are disabled)
3.

Actual results:
2020-09-17 21:03:46.836 45 ERROR keystone.server.flask.application raise exception.LDAPSizeLimitExceeded()
2020-09-17 21:03:46.836 45 ERROR keystone.server.flask.application keystone.exception.LDAPSizeLimitExceeded: Number of User/Group entities returned by LDAP exceeded size limit. Contact your LDAP administrator.

Expected results: Paging is disabled for Active Directory when you're using it as LDAP backend on Keystone


Additional info: