I did some research around LDAP and most of the cases this is handled from both parent->children and children->parent ways.
The parent should have a member attribute which include all its members not just the users (currently it only shows up when a parent group have users.)
The child groups should have a memberOf attribute, which shows the DN of its parent. Eg:
memberOf=cn=org1,ou=groups,DC=ldap,DC=authentik,DC=example,DC=com
Manual Workaround
If I add the memberOf attribute to the subgroup directly, it will show up in LDAP and I will be able to query it.
We'd implement this as only returning the direct parents/children of a group within that group, and allowing the client to recursively fetch all the other data.
Is your feature request related to a problem? Please describe.
Given scenario: I have 2 parent groups, 2 subgroups, 2 users.
When I'm querying the groups, LDAP results are showing the two
team1
groups, but it's not possible to determine which group belongs to which parent.Describe the solution you'd like
I did some research around LDAP and most of the cases this is handled from both parent->children and children->parent ways.
The parent should have a
member
attribute which include all its members not just the users (currently it only shows up when a parent group have users.)The child groups should have a
memberOf
attribute, which shows the DN of its parent. Eg:memberOf=cn=org1,ou=groups,DC=ldap,DC=authentik,DC=example,DC=com
Manual Workaround
If I add the memberOf attribute to the subgroup directly, it will show up in LDAP and I will be able to query it.
Further info
memberOf attribute: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-ada2/cc24555b-61c7-49a2-9748-167b8ce5a512
member attribute: https://datatracker.ietf.org/doc/html/rfc4519#section-2.17 https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-ada2/763d0861-f4f6-4251-847e-7e8dedcfe73f