Repository navigation
Conversation
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. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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, oruSNChangedclauses still returned all groups from the roles server.e.g.,
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