-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Mirroring LDAP groups doesn't work with v4.0-beta2 #15831
Comments
I can't seem to find any changes in beta2 that might impact this. We introduced a new custom Group model for v4.0, but that was present in the first beta release. @Cornelicorn are you certain this exception is raised only when running beta2, and not for beta1? |
Yes, also reproduced on a fresh |
Are you using nested groups, and after upgrading did you change |
I think this is from the moving of groups and using AUTH_LDAP_MIRROR_GROUPS, the ldap code is trying to use the auth.Groups model (https://github.com/django-auth-ldap/django-auth-ldap/blob/master/django_auth_ldap/backend.py#L782). Will potentially need to make a NetBox specific _mirror_groups function and monkey-patch it in? |
I have
That's also what I suspect after looking at their code. |
Or better override |
@Cornelicorn is this something you want to work on and submit a PR? |
@Cornelicorn could you please try #15902 ? It will hopefully fix the issue. |
Sorry, overlooked that.
Commenting on the PR for feedback |
Deployment Type
NetBox Cloud
NetBox Version
v4.0-beta2
Python Version
3.11
Steps to Reproduce
Setup netbox with ldap authentication and set
AUTH_LDAP_MIRROR_GROUPS=True
.This was tested using
django-auth-ldap==4.8.0
on Debian 12.Then try to login with an LDAP user.
This Setup is working on v4.0-beta1
Expected Behavior
The Groups get added to the user and you can login.
Observed Behavior
An error
500
is raised with the following traceback:The text was updated successfully, but these errors were encountered: