handavid opened a new pull request, #1331: URL: https://github.com/apache/knox/pull/1331
[KNOX-3386](https://issues.apache.org/jira/browse/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`](.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`](./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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
