Closed reichertan closed 1 year ago
Did you solve this problem? I face a similar problem. Groups are not populated to database and not visible in the UI.
Hello @martigr , it's been a while now. As far as I remember, I created a custom LDAP authentication backend in which the DefectDojo group assignments were set.
I had a closer look into the database. The LDAP groups are populated to the table auth_group
. But they are not populated to the table dojo_dojo_group
. This is the table used to show the group in the UI and used for permissions…
Hello @martigr , it's been a while now. As far as I remember, I created a custom LDAP authentication backend in which the DefectDojo group assignments were set.
Hi, @reichertan can you share the LDAP backend you have implemented? We are dealing with the same situation.
Hi @xzavrel, I used https://github.com/django-auth-ldap/django-auth-ldap/blob/master/django_auth_ldap/backend.py as a template. The _LDAPUser class there has a _get_or_create_user method, there you could add code to assign users to or remove users from Dojo groups.
If you have created your own backend, you can add it in settings.dist.py to the AUTHENTICATION_BACKENDS list.
Sorry, I'm not allowed to paste my exact code.
Hello, I have a problem with group replication from ActiveDirectory. An ActiveDirectory user can log in, but the AD groups are not replicated correctly.
If I set AUTH_LDAP_MIRROR_GROUPS = True and log in with an AD user, I see in the database that the Django tables auth_group, auth_group_permissions and auth_user_groups are written correctly. However, the AD groups are missing from the DefectDojo tables dojo_dojo_group and dojo_dojo_group_member. I can't see these AD groups in the DefectDojo web user interface either.
If I set AUTH_LDAP_MIRROR_GROUPS = False and create the groups manually via the DefectDojo web user interface, the AD user is not assigned to these groups when logging in.
Here is my LDAP configuration:
Expected behavior AD users should also have their AD group membership in DefectDojo.
Deployment method (select with an
X
)Environment information