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

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

                Author: ASF GitHub Bot
            Created on: 21/May/26 05:20
            Start Date: 21/May/26 05:20
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on code in PR #1236:
URL: https://github.com/apache/knox/pull/1236#discussion_r3278814956


##########
gateway-server/src/main/java/org/apache/knox/gateway/services/ldap/backend/LdapProxyBackend.java:
##########
@@ -269,6 +274,18 @@ public Entry getUser(String username, SchemaManager 
schemaManager) throws Except
                 return entry;
             }
             cursor.close();

Review Comment:
   This is what it looks like now:
   <img width="970" height="462" alt="image" 
src="https://github.com/user-attachments/assets/ec7b439d-b0cb-4c25-9525-d78e64141742";
 />
   As you can see, there is a `cursor.close()` before the `return entry` line 
too that ensures the cursor is closed.
   However, I'd think that adding an `else` case to the `if (cursor.next()) 
{`condition would make it cleaner.





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

    Worklog Id:     (was: 1021391)
    Time Spent: 50m  (was: 40m)

> Support recursive group resolution in LDAP Proxy Service
> --------------------------------------------------------
>
>                 Key: KNOX-3328
>                 URL: https://issues.apache.org/jira/browse/KNOX-3328
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 3.0.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 3.0.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The current Knox LDAP proxy implementation only supports direct group 
> memberships for users. When a client queries for a user's {{memberOf}} 
> attribute, Knox only returns the groups where the user is an explicit member, 
> ignoring any transitive or nested group memberships.
> Additionally, group entries themselves are not enriched with the {{memberOf}} 
> attribute, making it difficult for clients to walk the hierarchy manually.
> This task implements:
> # Recursive group resolution for both search-based and {{memberOf}}-based 
> lookups.
> # Strict cycle detection to prevent infinite loops in misconfigured LDAP 
> environments.
> # Configurable depth limits to prevent performance degradation.
> # Enrichment of group-type entries with the {{memberOf}} attribute, allowing 
> clients to see parent group memberships.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to