[ 
https://issues.apache.org/jira/browse/KNOX-3595?focusedWorklogId=1056366&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1056366
 ]

ASF GitHub Bot logged work on KNOX-3595:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Nov/26 04:35
            Start Date: 21/Nov/26 04:35
    Worklog Time Spent: 10m 
      Work Description: 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




Issue Time Tracking
-------------------

            Worklog Id:     (was: 1056366)
    Remaining Estimate: 0h
            Time Spent: 10m

> LDAP Roles interceptor ignore modifyTimestamp
> ---------------------------------------------
>
>                 Key: KNOX-3595
>                 URL: https://issues.apache.org/jira/browse/KNOX-3595
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: LDAP
>    Affects Versions: 3.0.0
>            Reporter: David Han
>            Assignee: David Han
>            Priority: Major
>             Fix For: 3.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The modifyTimestamp can be used to search for changes in LDAP since some 
> time. The Roles service is not defined to have any mechanism for returning 
> changes. In the short-term, add a configuration to the roles interceptor to 
> remove the modifyTimestamp clauses from the search filter and return all 
> roles.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to