LDAP and Django group assignment issue #1267

Closed
opened 2025-12-29 16:30:55 +01:00 by adam · 4 comments
Owner

Originally created by @Zimeon- on GitHub (Oct 2, 2017).

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Auto-assingment of groups doesn't seem to work between LDAP and custom groups as per this topic here created on the discussion board. LDAP debug log shows that the groups are discovered but group membership is not added. Group memberships work with the default groups in netbox.

Environment

  • Python version: Python 2.7.5
  • NetBox version: NetBox (v2.1.4)

Description

To replicate the issue;

  1. Create a group in netbox, assign it some permissions
  2. change ldap_config.py and add the group assignment as per post and restart to reload config (if needed)
  3. Login with user (no change if user is deleted first)
Originally created by @Zimeon- on GitHub (Oct 2, 2017). ### Issue type [ ] Feature request [x] Bug report [ ] Documentation Auto-assingment of groups doesn't seem to work between LDAP and custom groups as per [this topic here](https://groups.google.com/forum/#!topic/netbox-discuss/-1krZXH79L4) created on the discussion board. LDAP debug log shows that the groups are discovered but group membership is not added. Group memberships work with the default groups in netbox. ### Environment * Python version: Python 2.7.5 * NetBox version: NetBox (v2.1.4) ### Description To replicate the issue; 1) Create a group in netbox, assign it some permissions 2) change ldap_config.py and add the group assignment as per post and restart to reload config (if needed) 3) Login with user (no change if user is deleted first)
adam closed this issue 2025-12-29 16:30:56 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 6, 2017):

NetBox doesn't handle much in the way of LDAP itself. Is there something we need to adjust in NetBox, or should this issue be raised with the django_auth_ldap project?

@jeremystretch commented on GitHub (Oct 6, 2017): NetBox doesn't handle much in the way of LDAP itself. Is there something we need to adjust in NetBox, or should this issue be raised with the [django_auth_ldap](https://bitbucket.org/psagers/django-auth-ldap) project?
Author
Owner

@Zimeon- commented on GitHub (Oct 9, 2017):

Possibly, i'll dig around some more.

@Zimeon- commented on GitHub (Oct 9, 2017): Possibly, i'll dig around some more.
Author
Owner

@jeremystretch commented on GitHub (Oct 13, 2017):

Closing this out as it's probably an external library issue, but please comment here again if this needs to be reopened.

@jeremystretch commented on GitHub (Oct 13, 2017): Closing this out as it's probably an external library issue, but please comment here again if this needs to be reopened.
Author
Owner

@Zimeon- commented on GitHub (Oct 25, 2017):

Just a note here as well, Using "AUTH_LDAP_MIRROR_GROUPS = True" is the way to get this working. Using "AUTH_LDAP_USER_FLAGS_BY_GROUP = {}" only sets the flag as true/false and thus doesn't work for other than the 3 pre-defined roles.

@Zimeon- commented on GitHub (Oct 25, 2017): Just a note here as well, Using "AUTH_LDAP_MIRROR_GROUPS = True" is the way to get this working. Using "AUTH_LDAP_USER_FLAGS_BY_GROUP = {}" only sets the flag as true/false and thus doesn't work for other than the 3 pre-defined roles.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1267