Repository navigation
[ZEPPELIN-6171] Resolve nested LDAP groups on FreeIPA via memberOf #5505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tbonelee
merged 3 commits into
apache:master
from
HwangRock:ZEPPELIN-6171-freeipa-memberof-nested-groups
Oct 5, 2026
+406
−50
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
d7680a6
[ZEPPELIN-6171] Resolve nested LDAP groups on FreeIPA via memberOf
HwangRock f59825a
Merge remote-tracking branch 'origin/master' into ZEPPELIN-6171-freei…
HwangRock 0be58d9
[ZEPPELIN-6171] Scope memberOf groups to groupSearchBase; address review
HwangRock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On FreeIPA,
memberOfalso holds entries that aren't groups. FreeIPA configures the MemberOf plugin withmemberUser,memberHostandipaOwnerin addition tomember(install/share/memberof-conf.ldif), so a user'smemberOfalso carries the DNs of HBAC rules, sudo rules and roles (cn=roles). The current code treats all of them as groups.I checked this by setting up a 389 DS container with the same plugin config and DN layout as FreeIPA (
cn=groups,cn=accounts, etc.) and logging in to Zeppelin built from this branch. alice ∈ dev ∈ eng, and alice also has the helpdesk role, one HBAC rule and one sudo rule:groupSearchEnableMemberOf=false:["user_role"]groupSearchEnableMemberOf=true:["user_role","admin_role","helpdesk","aaaa-1111","bbbb-2222"]The nested group is resolved as intended, but the
ipaUniqueIDs of the HBAC and sudo rules and the role name also became roles. If such a name matches a key inrolesByGroup, aroles[...]in[urls], or a role name used in note permissions, it grants permissions nobody intended.How about accepting only DNs under
groupSearchBase, like the other two paths? It can be checked withnew LdapName(groupDn).startsWith(new LdapName(groupSearchBase)), and in the same setup the result became["user_role","admin_role"].When
groupSearchBaseisn't set, it falls back tosearchBase(usually the root), so the filter wouldn't filter anything. Since this flag isn't in any release yet, how about starting strict: in memberOf mode, accept nomemberOfvalues whengroupSearchBaseisn't set, and warn inonInit()? Relaxing that later stays compatible, but tightening it later would change existing users' roles.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this, it's a critical one!
Fixed it to only accept DNs under groupSearchBase like you suggested.