Details
Description
Hello,
The
Set<String> doGetGroups(String user, int goUpHierarchy)
method in
Looks like having an issue if in the middle of the loop a NamingException is caught:
The groups variable is not reset in the catch clause and therefore the fallback lookup cannot be executed (when goUpHierarchy==0 at least):
if (groups.isEmpty() || goUpHierarchy > 0) {
groups = lookupGroup(result, c, goUpHierarchy);
}
Consequence is that only a partial list of groups is returned, which is not correct.
Following options could be used as solution:
- Reset the group to an empty list in the catch clause, to trigger the fallback query.
- Add an option flag to enable ignoring groups with Naming Exception (since they are not groups most probably)
Independently, would any issue also occur (and therefore full list cannot be returned) in the first lookup as well as in the fallback query, the method should/could(with option flag) throw an Exception, because in some scenario accuracy is important.
Attachments
Issue Links
- is depended upon by
-
HADOOP-18305 Release Hadoop 3.3.4: minor update of hadoop-3.3.3
- Resolved
- links to