question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AUTH_LDAP_FIND_GROUP_PERMS setting unclear

See original GitHub issue

It is not clear (to me at least) what AUTH_LDAP_FIND_GROUP_PERMS does exactly. From the documentation:

If True, LDAPBackend will furnish group permissions based on the LDAP groups the authenticated user belongs to.

There is also the following hint in the README, which is already a bit more clear to me:

Use LDAP group membership to calculate group permissions.

When reading the source code, my understanding is

If True, the LDAPBackend use group membership to calculate group permissions, that is: if a user is a member a given LDAP group, the permissions of the Django group with the same name will be given to that user.

If this understanding is correct, I’m still a bit puzzled:

  • Isn’t this the default behavior in Django, i.e. why is there a separate (default False) option for this?
  • What is the relationship with AUTH_LDAP_MIRROR_GROUPS, i.e. wouldn’t setting that setting to True imply the behavior regardless of the value for AUTH_LDAP_USER_FLAGS_BY_GROUP?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
vanschelvencommented, Aug 22, 2021

A review would be much appreciated!

Done, looks good to me!

1reaction
vanschelvencommented, Jun 29, 2021

Thanks very much for the very clear explanation! For me personally this closes the issue; I’m leaving it up to you to close it if/when you update the documentation (or to close it without updating the documentation if you so prefer).

Read more comments on GitHub >

github_iconTop Results From Across the Web

django-auth-ldap AUTH_LDAP_FIND_GROUPS_PERMS not ...
My current configuration authenticates properly against the AD, however, when I enabled AUTH_LDAP_FIND_GROUPS_PERMS it doesn't seem to do ...
Read more >
Permissions - django-auth-ldap - Read the Docs
Any group that doesn't exist will be created and the user's Django group membership will be updated to exactly match their LDAP group...
Read more >
LDAP authentication settings don't persist when "LDAP Group ...
Login to the webui. Click on "Settings", click on "Authentication", select "LDAP" from the "Sub Category" drop-down on the right. Input ...
Read more >
Initially create django users from AD - Google Groups
# Use LDAP group membership to calculate group permissions. AUTH_LDAP_FIND_GROUP_PERMS = True. # Cache group memberships for 5 minutes to reduce LDAP traffic....
Read more >
Configuring Active Directory with MX Security Appliances
Configure Group Policies in Dashboard. Configure Active Directory Authentication in Dashboard. Create LDAP group to Group Policy mappings in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found