broad-flag-97458
05/26/2021, 12:44 PMsn
set but not a given_name
. I saw the optional parameter drop_missing_first_last_name
but I don’t think it’s applicable because this account does have a last_name. My question is should I just ensure that each user in a group has a proper givenName and sn? Or would there be a use case in general to be able to exclude users if they don’t have a givenName? I’ve got to capture it like (diff)
- first_name = attrs["givenName"][0].decode()
+ first_name = (attrs["givenName"][0]).decode() if "givenName" in attrs else None
a. I guess our LDAP server (active directory) is structured a little different than the assumptions. I had to add this block to make ldap ingestion work (otherwise I’d get index errors, etc.). My question is, is this a typical scenario that should be captured more broadly or is it just my screwy ldap setup? Diff:
+ if "objectClass" in attrs:
if (
- b"inetOrgPerson" in attrs["objectClass"]
+ b"organizationalPerson" in attrs["objectClass"]
+ or b"inetOrgPerson" in attrs["objectClass"]
or b"posixAccount" in attrs["objectClass"]
loud-island-88694
gray-shoe-75895
05/26/2021, 5:43 PMdrop_missing_first_last_name
parameter was added to work around some issues with Microsoft Active Directory, and we can definitely tweak it a little bit to work for you as well - I’m curious what sorts of users have a last name but not a first name in your system. Ditto with the objectClass issue.gray-shoe-75895
05/26/2021, 5:43 PMbroad-flag-97458
05/26/2021, 6:07 PMobjectClass
, I noticed that as the ingest was looping through my group that it encountered something strange (it seemingly saw ref: ldap://[domain].com/CN=Configuration,DC=[domain],DC=com
as a user? I know because I just did a simple debug print()
on the attrs as it was iterating)
3. For organizationalPerson
I guess it’s just that our AD admins use that vs inetOrgPerson
?gray-shoe-75895
06/02/2021, 10:33 PMbroad-flag-97458
06/03/2021, 2:40 AM