Description
Add posixGroups support for LDAP group lookup. The current implementation works only with groupOfNames.
posixGroups have "memberUid" attribute which is different from "member" attribute, and when we set main.ldapRealm.memberAttribute equal to "memberUid", this line (306) in org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm.java:
if (userLdapDn.equals(new LdapName(attrValue)))
will generate an InvalidNameException because "memberUid" is just an id and not formatted according to the rules defined in RFC 2253.
To fix this, we need to just test if the group is a posixGroup and then update attrValue by adding memberAttributeValuePrefix and memberAttributeValueSuffix