Skip to content

ZEPPELIN-6171 Add FreeIPA authentication with memberOf attribute for groups maping #4917

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ruslanfialkovskii
Copy link
Contributor

What is this PR for?

This pull request introduces support for LDAP authentication using the memberOf attribute, retrieving user group memberships from LDAP systems like FreeIPA.

Problem
Previously, Zeppelin's LdapRealm could only determine group memberships by searching all groups in the LDAP directory and checking if the user was a member of each group. This approach doesn't properly support nested group memberships in systems that use the memberOf attribute like FreeIPA.

Solution
This PR adds the ability to use the memberOf attribute for determining group memberships by:

Adding configuration options to enable memberOf attribute support:

Implementing a new code path in the rolesFor method that:

Searches for the user and retrieves their memberOf attribute values
Correctly extracts group names from the memberOf Distinguished Names
Maps these group names to roles based on the configured rolesByGroup mapping
Properly handling the LDAP Distinguished Name (DN) component order when extracting group names by iterating through the DN components in the correct order

What type of PR is it?

Improvement

Please leave your type of PR only

Todos

  • - Task

What is the Jira issue?

[ZEPPELIN-6171]

How should this be tested?

added automated unit tests for any new or changed behavior

@ruslanfialkovskii
Copy link
Contributor Author

Hello. Any chance to pass a review?

@jongyoul
Copy link
Member

Let me start to review it soon.

@Reamer
Copy link
Contributor

Reamer commented May 6, 2025

The rolesFor method reaches a very high level of complexity with the change. Please introduce private methods to reduce the complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants