Hi everybody,
I'm using Django 1.5.4 with django_auth_ldap 1.1.4 and have troubles, to map LDAP groups to Django groups.
My configuration looks like this. I'm using an Active Directory to authenticate.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
AUTH_LDAP_GROUP_SEARCH = LDAPSearch("dc=corp,dc=bar,dc=com", ldap.SCOPE_SUBTREE, "(objectClass=group)")
AUTH_LDAP_GROUP_TYPE = NestedGroupOfNamesType()
AUTH_LDAP_USER_FLAGS_BY_GROUP = {
"is_staff": "CN=foo,OU=Corporation,OU=Security Groups,OU=bar,DC=corp,DC=bar,DC=com",
"is_superuser": "CN=foo,OU=Corporation,OU=Security Groups,OU=bar,DC=corp,DC=bar,DC=com"
}
AUTH_LDAP_FIND_GROUP_PERMS = True
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The login works as expected. Due to my membership in "CN=foo,OU=Corporation,OU=Security Groups,OU=bar,DC=corp,DC=bar,DC=com" I get the staff and superuser flag. The log shows, that django_auht_ldap finds all of my group memberships in the Active Directory, but the mapping to Django groups does not work.
I tried several names for the Django group, but none of them worked: "foo", "CN=foo", even "CN=foo,OU=Corporation,OU=Security Groups,OU=bar,DC=corp,DC=bar,DC=com".
If I login and check my groups, none of them are mapped. Am I missing something?
Cheers,
Christian