Skip to content
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

LDAP Ingestion not working for lower-case objectClass definitions (using FreeIPA, for example) #11988

Open
nmartineznl opened this issue Nov 28, 2024 · 1 comment
Labels
bug Bug report

Comments

@nmartineznl
Copy link

Describe the bug
While executing LDAP ingestion using FreeIPA, groups are being dropped because objectClass values are in lower-case.
Users work because the objectClass value "person" does not contain any capital letter.

FreeIPA user class:
objectClass: posixgroup

LDAP code that processes users and groups:

                if (
                    b"inetOrgPerson" in attrs["objectClass"]
                    or b"posixAccount" in attrs["objectClass"]
                    or b"person" in attrs["objectClass"]
                ):
                    yield from self.handle_user(dn, attrs)
                elif (
                    b"posixGroup" in attrs["objectClass"]
                    or b"organizationalUnit" in attrs["objectClass"]
                    or b"groupOfNames" in attrs["objectClass"]
                    or b"group" in attrs["objectClass"]
                ):
                    yield from self.handle_group(dn, attrs)
                else:
                    self.report.report_dropped(dn)

To Reproduce
Steps to reproduce the behavior:

  1. Configure LDAP ingestion as documented in https://datahubproject.io/docs/generated/ingestion/sources/ldap/
  2. Configure FreeIPA as the LDAP server
  3. Run the ingestion as documented in: https://datahubproject.io/docs/metadata-ingestion/cli-ingestion/
  4. The report contains all groups in the dropped_dns list and groups are not created.

Expected behavior
The dropped_dns should be empty and groups should be created in DataHub.

@nmartineznl nmartineznl added the bug Bug report label Nov 28, 2024
@nmartineznl
Copy link
Author

I belive that for both users and groups processing the comparisson should be case-insensitive

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

No branches or pull requests

1 participant