handavid commented on code in PR #1318:
URL: https://github.com/apache/knox/pull/1318#discussion_r3630825141


##########
gateway-server/src/main/java/org/apache/knox/gateway/services/ldap/KnoxLDAPServerManager.java:
##########
@@ -470,6 +470,13 @@ public List<String> getUserGroups(String username) throws 
Exception {
                             int commaIdx = groupDn.indexOf(',');
                             if (commaIdx > 0) {
                                 groups.add(groupDn.substring(3, commaIdx));
+                            } else if (hasRolesLookupInterceptor) {

Review Comment:
   This looks ok, but I was wondering if we could convert the value to a `Dn` 
and pull the `Rdn` instead of string splitting. e.g., something like:
   ```
   Dn groupDn = new Dn(value.getString());
   String groupName = groupDn.getRdn().getValue();
   ```
   I feel that would be more resilient regardless of what RDN is used



-- 
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]

Reply via email to