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

ObjectClass and Attributes #13

Open
rouxn-bsi opened this issue Oct 17, 2024 · 0 comments
Open

ObjectClass and Attributes #13

rouxn-bsi opened this issue Oct 17, 2024 · 0 comments

Comments

@rouxn-bsi
Copy link

Hi again / (Re)Bonjour @MrBE4R,

As mentioned in issue #12, I’m using JumpCloud LDAP and need to modify the Python code statically to make it work.

I believe some "objectClass" values and "attribute names" should be set dynamically in the config.json file.

For examples, with JumpCloud:

  • The filter for group must be changed to "groupOfNames"
    filterstr = '(&(objectClass=**groupOfNames**)(cn=%s*))
  • And the attribute "name" must be changed to "cn"
    attrlist=['**cn**', 'member']
    [...]
                ldap_groups_names.append(group_data['**cn**'][0].decode())
                ldap_group = {"name": group_data['**cn**'][0].decode(), "members": []}
  • The attribute for user must be changed from "DisplayName" to "cn"
    ldap_group['members'].append({
    'username': username,
    'name': user_data['cn'][0].decode(),
    'identities': str(member).lower(),
    'email': user_data['mail'][0].decode()

That’s why I believe it would be beneficial to define these in the config.json.
I’m implementing this and will share "my" version of the script later.

Cheers,
Nicolas

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

No branches or pull requests

1 participant