Skip to content

KNOX-3386: LDAP Proxy pages backends - #1331

Merged
smolnar82 merged 4 commits into
apache:masterfrom
handavid:ldap-paging
Jul 31, 2026
Merged

KNOX-3386: LDAP Proxy pages backends#1331
smolnar82 merged 4 commits into
apache:masterfrom
handavid:ldap-paging

Conversation

@handavid

Copy link
Copy Markdown
Contributor

KNOX-3386 - LDAP Proxy pages backends

What changes were proposed in this pull request?

Adds a gateway.ldap.max.size.limit and max.time.limit configs to the LDAP Proxy. Thes configs are uses to set the LDAP server's maxSizeLimit and maxTimeLimit fields. The size limit indictes the maximum total number of search results for a request across all pages. The time limit is in milliseconds.

Implements paging to the backend LDAP servers. This is controlled by a new "pageSize" config on the LDAP Proxy Backends.

A bug was found during testing where the getUserGroups method will doubly retrieve the groups. This has been fixed.

How was this patch tested?

(Please explain how this patch was tested. For instance: running automated unit/integration tests, manual tests. Please write down your test steps as detailed as possible)

Unit tests were added/updated in LdapProxyBackendTest and LdapProxyBackendSslTest

manual testing was performed against AD by setting the following values in the gateway-site.xml

    <property>
        <name>gateway.ldap.sizelimit</name>
        <value>5000</value>
        <description>Base DN for LDAP entries in the proxy server. Default is dc=proxy,dc=com.</description>
    </property>

    <property>
        <name>gateway.ldap.interceptor.localldap.pageSize</name>
        <value>3</value>
    </property>
    <property>
        <name>gateway.ldap.interceptor.ad.pageSize</name>
        <value>3</value> 
    </property>

Logging was increased to DEBUG level to see the paging-related log messages.

Integration Tests

(Please add or update integration tests .github/workflows/tests for the feature you are adding. If no unit test is added, please explain why. Check out .github/workflows/tests/README.md for instructions)

The gateway-site was modified for the workflow tests to set a small page size. This ensure that the proxy needs to page to return the results in the tests.

UI changes

none

Adds a gateway.ldap.max.size.limit and max.time.limit configs to the
LDAP Proxy. Thes configs are uses to set the LDAP server's maxSizeLimit
and maxTimeLimit fields. The size limit indictes the maximum total number
of search results for a request across all pages. The time limit is in
milliseconds.

Implements paging to the backend LDAP servers. This is controlled
by a new "pageSize" config on the LDAP Proxy Backends.

A bug was found during testing where the getUserGroups method will
doubly retrieve the groups. This has been fixed.
@handavid

Copy link
Copy Markdown
Contributor Author

@smolnar82

@test was missed when resolving conflicts. This commit adds it back in.
@smolnar82 smolnar82 changed the title Knox-3386: LDAP Proxy pages backends KNOX-3386: LDAP Proxy pages backends Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Test Results

40 tests   40 ✅  6s ⏱️
 3 suites   0 💤
 3 files     0 ❌

Results for commit 657e162.

♻️ This comment has been updated with latest results.

@handavid

Copy link
Copy Markdown
Contributor Author

@smolnar82 ready for re-review

Comment thread knox-site/docs/service_ldap_server.md Outdated
Comment thread knox-site/docs/service_ldap_server.md Outdated
@smolnar82
smolnar82 merged commit e713c58 into apache:master Jul 31, 2026
3 checks passed
smolnar82 pushed a commit that referenced this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants