-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Failed to load groups with LDAP auth #216
Comments
I can give more info about this issue, I think is related to LDAP tree structure. I got two productions installations and in one I can get all groups without any problem, but in the other one i get the error described above. both installations are pretty similar but tree structure is different. what info do you need to debug this issue? |
Hi @muzzol, could you check please, if user entry contains |
yes, the field is there.
|
Then I have no idea to be honest... let me play with it at home |
are you sure that the missing attribute is UID? I have different setups with groups and members, so if you can tell me exactly which attribute is giving problems I can debug it. |
According to the code, the error happens when I get entry dn and uid.value Also, could it be ldap3 version issue? I mean if ldap3 package versions are different |
Hi @muzzol, Could you add a log statement to src/auth/auth_ldap.py, line 205: And could you tell me your ldap3 version, please? My current assumptions are different ldap3 versions OR users do not have rights to read their own ldap attributes (sounds weird) |
Hi @muzzol, could you check my last message, please? |
sorry @bugy for taking so long but I was busy with other projects. where exactly do you want me to put this line? here are lines 200-210 of my auth_ldap.py:
|
ok, I think I got it:
|
Hi @muzzol, thanks a lot! I'll have a look next week probably |
Hi @muzzol, Could you try one more thing on your code. In the same place, where you did changes already, replace existing code:
with the following:
It can be For future reference: related commit in ldap3 module: cannatag/ldap3@1130221#diff-99157569b3f8968a3735cfad9e041ee3 |
it worked! grups are loaded now: |
Thanks for checking! Then I'll add this fix to the repository
And sorry for taking so long...
mussol <[email protected]> schrieb am Mi., 6. Nov. 2019, 10:03:
… it worked!
grups are loaded now:
2019-11-06 10:02:30,372 [script_server.LdapAuthorizer.INFO] Loaded groups
for b1: ['group2', 'test-admin']
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#216?email_source=notifications&email_token=AAJXPJIVYKXKH2JUYTCH6UDQSKB6FA5CNFSM4HNUVCLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDFZR6I#issuecomment-550213881>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXPJLPCEQKPTZM3TOGVK3QSKB6FANCNFSM4HNUVCLA>
.
|
no man, thank you for your time! |
I can login with my LDAP user but groups are not fetched. I get this line when I log in:
this is my conf
and I can login so LDAP connection is working.
It could be related my LDAP tree because I got some nested OUs.
Users are in this OU:
and groups are here:
maybe an additional setting like group_base_dn could be useful (some apps do it that way to avoid any confusion with other parts of tree).
I'm testing it with 1.14
The text was updated successfully, but these errors were encountered: