LDAP authentication group type does not match all environments. Current implementation assumes a group type of GroupOfUniqueNamesType
. In my case, this would need to be NestedMemberDNGroupType
instead
InvenTree/InvenTree/InvenTree/settings.py
Line 310 in 36bfd62
Additionally, the AUTH_LDAP_GROUP_SEARCH
setting hardcodes an objectClass
to search for, which does not match all environments.
InvenTree/InvenTree/InvenTree/settings.py
Lines 363 to 368 in 36bfd62
For my environment, I would need this instead. Note the change of objectClass
,, and that I specified the member_attr
when setting AUTH_LDAP_GROUP_TYPE
AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
get_setting("INVENTREE_LDAP_GROUP_SEARCH", "ldap.group_search"),
ldap.SCOPE_SUBTREE,
"(objectClass=group)",
)
AUTH_LDAP_GROUP_TYPE = NestedMemberDNGroupType(member_attr="member", name_attr="cn")
Finally, I'd like to mirror my LDAP groups from the search base to InvenTree. The AUTH_LDAP_MIRROR_GROUPS
option should be available. Something like
AUTH_LDAP_MIRROR_GROUPS = get_boolean_setting("INVENTREE_LDAP_MIRROR_GROUPS")
Make these tweaks configurable through the .env
file.
We are unable to use LDAP authentication in our AD environment with the current settings. I was able to get this working for us by changing the hardcoded objects to match by environment described above by directly editing settings.py
, but feel this should be configurable and upstreamed, instead of my hacky edits.
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too