Fix group member attribute selection for 389 Directory Server#161
Fix group member attribute selection for 389 Directory Server#161c1-dev-bot[bot] wants to merge 1 commit into
Conversation
The Grant and Revoke methods used a heuristic that defaulted to the uniqueMember attribute (groupOfUniqueNames) for groups that were not posixGroup or ipausergroup/AD. 389 Directory Server uses groupOfNames, which requires the member attribute instead, causing an LDAP Object Class Violation (code 65). Restructure the switch to explicitly check for groupOfUniqueNames (the only standard object class that uses uniqueMember) and default to the member attribute for all other group types (groupOfNames, group, ipausergroup, AD groups with objectGUID, etc.). Fixes: CXH-1451
|
Claude finished @c1-dev-bot[bot]'s task in 1m 39s —— View job PR Review: Fix group member attribute selection for 389 Directory Server
Verdict: Approve — this is a clean, correct fix with sound reasoning. What changedThe
Why this is correct
Minor issueConst alignment ( // Current (misaligned):
attrGroupMemberPosix = "memberUid"
attrGroupDescription = "description" // ← one space short
// Expected:
attrGroupMemberPosix = "memberUid"
attrGroupDescription = "description"SummaryThe logic change is correct and well-targeted. The old default of |
|
I created another PR before the bot created this one: #160 |
Summary
uniqueMember(used bygroupOfUniqueNames) for groups that didn't matchposixGrouporipausergroup/AD patternsgroupOfNameswhich requires thememberattribute, notuniqueMembergroupOfUniqueNames(the only class needinguniqueMember) and default tomemberfor all other group typesDetails
The root cause was in
pkg/connector/group.goin both theGrant()andRevoke()methods. The switch statement logic was:posixGroup→memberUid(correct)ipausergroupor hasobjectGUID→member(correct but overly specific)uniqueMember(wrong forgroupOfNames,group, etc.)The fix changes this to:
posixGroup→memberUid(unchanged)groupOfUniqueNames→uniqueMember(explicitly targeted)member(correct forgroupOfNames,group,ipausergroup, AD groups, etc.)This resolves the TODO comment that was already in the Revoke method acknowledging this needed to be addressed.
Test plan
groupOfNamesgroupsgroupOfUniqueNamesgroupsgroupobject classposixGroupgroupsFixes: CXH-1451
Automated PR Notice
This PR was automatically created by c1-dev-bot as a potential implementation.
This code requires: