handavid opened a new pull request, #1536: URL: https://github.com/apache/knox/pull/1536
[KNOX-3595](https://issues.apache.org/jira/browse/KNOX-3595) - Ignore delta-sync timestamp clauses in LDAP all-groups search ## What changes were proposed in this pull request? A client performing an incremental/delta sync adds a modifyTimestamp (or its Active Directory equivalent whenChanged) clause to a groups search to request only the groups changed since its last sync. The roles service cannot compute a delta, so when enabled this strips such clauses before the filter is classified, making the search fall back to a full all-groups search that returns every role. - Strip delta-sync clauses from the search filter, rebuilding AND/OR branch nodes from their surviving children (leaving the caller's filter untouched) and treating a branch with no survivors as "nothing left to match". - Add gateway.ldap.interceptor.<name>.ignoreDeltaSyncTimestamps (default false, opt-in) to gate the behavior. - Add gateway.ldap.interceptor.<name>.deltaSyncAttributes, a comma-separated, case-insensitive list of attribute names to strip, defaulting to modifyTimestamp,whenChanged; a configured list replaces the default. A value with no usable names (only commas or whitespace) falls back to the default rather than silently disabling stripping. - Add unit tests and a system test, and document both properties. ## How was this patch tested? Added unit tests. Manually tested using the file-based Roles lookup and reverse lookup classes. Verified that searching while including the `modifyTimestamp`, `whenChanged`, or `uSNChanged` clauses still returned all groups from the roles server. e.g., ``` ldapsearch -v -x -H ldap://localhost:3890 -D 'uid=bind,ou=people,dc=proxy,dc=com' -w bind-password -E pr=250/noprompt -b 'ou=groups,DC=proxy,DC=com' -s sub '(&(objectClass=groupOfNames)(|(modifyTimestamp>=20261115074418.0Z)(uSNChanged>=2337200000)))' '*' '+' ``` ## Integration Tests An integration test was added that performs a search using `(&(objectClass=groupOfNames)(modifyTimestamp>=20261118163513.0Z))` as the search filter and verifies that all expected groups are present in the result. ## UI changes No UI changes -- 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]
