smolnar82 commented on code in PR #1236:
URL: https://github.com/apache/knox/pull/1236#discussion_r3279869950
##########
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();
+
+ // 2. Try search in group base if not found in user base
+ String groupFilter = "(cn=" + username + ")";
+ cursor = connection.search(groupSearchBase, groupFilter,
SearchScope.SUBTREE, "*", "+");
+ if (cursor.next()) {
+ Entry sourceEntry = cursor.get();
+ Entry entry = createProxyEntry(sourceEntry, username,
connection, schemaManager);
+ cursor.close();
+ return entry;
+ }
+ cursor.close();
+
return null;
Review Comment:
The `return null` is actually not new in this PR:
<img width="1115" height="584" alt="image"
src="https://github.com/user-attachments/assets/325ae564-e8ae-4769-ad41-5d0ce6de2590"
/>
According to the JavaDoc of the parent class, this is perfectly ok:
<img width="550" height="365" alt="image"
src="https://github.com/user-attachments/assets/bec69296-ad53-4d06-a79a-06d985b38b4c"
/>
On the other hand, I agree that it's good to have some DEBUG log.
--
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]