You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/389ds/design/memberof-specific-group-scoping-design.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,20 +18,20 @@ Admins may only need select groups to be maintained by the memberOf plugin. Or,
18
18
Design
19
19
------
20
20
21
-
There is already a "scoping" function in the code: **memberof_entry_in_scope** This function is used to check any entry involved with the group update - meaning both groups and members. Members can be "users" or non-groups, and they can also be other/nested groups. Previously this function just checked if there was included/excluded subtrees. Now we will also check for "specific groups".
21
+
There is already a "scoping" function in the code: **memberof_entry_in_scope** This function is used to check any entry involved with the group update - meaning both groups and members. Members can be "users" or non-groups, and they can also be other/nested groups. Previously this function just checked if there was included/excluded subtrees. Now we will also check for "specific groups" using LDAP search filters.
22
22
23
23
This presents a challenge when trying to scope specific "groups" and not scope "non-group" members. For example, **memberof_entry_in_scope** is also used when processing new "members". So it needs to know if the member is a group or not. If it is a group, then we need to check the include/exclude specific group constraints, otherwise we can just proceed with updating that member.
24
24
25
25
To overcome this issue we must determine if an entry is a "group" or not. This entry identification is done early in each postop function using the **memberof_set_entry_info** function where we check if the entry has certain "group" objectclasses. If it has one of these objectclasses then we mark the entry as a group. This list of group-defining objectclasses defaults to: *groupOfNames*, *groupOfUniqueNames*, and *nsAdminGroup* (this list of objectclasses can also be customized). So by identifying the entry type as a group or non-group, **memberof_entry_in_scope** can correctly apply the scoping rules.
26
26
27
-
This is implemented by passing a new *entry_info C struct*, that contains the group DNand its entry type, to **memberof_entry_in_scope**. Now this scoping function knows whether it needs to apply "specific group" scoping or not. Note that we only need this entry-type distinction for handling individual membership updates. The original target entry passed to the plugin is always assumed to be a group (scoping always applies regardless of its objectclasses).
27
+
This is implemented by passing a new *entry_info C struct*, that contains the group DN, the Slapi_Entry, and its entry type (group or not a group), to **memberof_entry_in_scope**. Now this scoping function knows whether it needs to apply "specific group" scoping or not. Note that we only need this entry-type distinction for handling individual membership updates. The original target entry passed to the plugin is always assumed to be a group (scoping always applies regardless of its objectclasses).
28
28
29
29
30
30
31
31
Behavior
32
32
--------
33
33
34
-
The specific group constraints are strict. If you specify one specific group to include, then all other groups in the DIT will be excluded, regardless of their location. If it's not a "specific group", then it's not updated. Similarly for excluding specific groups, if the group is not in the exclude list, then it gets updated. It doesn't make sense to both include and exclude specific groups simultaneously. Instead, choose one approach that best fits your needs. Using "exclude" rules is the preferred approach as it requires less maintenance, but the choice depends on your specific database usage.
34
+
The specific group constraints are strict. If you specify one specific group to include, then all other groups in the DIT will be excluded, regardless of their location. If it's not found by the "specific group" filters, then it's not updated. Similarly for excluding specific groups, if the group is not by the exclude filters, then it gets updated. It might not make sense to use both include and exclude specific group filters simultaneously. Instead, choose one approach that best fits your needs.
35
35
36
36
Major configuration options and enablement
37
37
------------------------------------------
@@ -40,30 +40,34 @@ The "entry_info" struct in memberof.c
40
40
41
41
typedef struct _MemberofEntryInfo
42
42
{
43
+
Slapi_Entry *e;
43
44
Slapi_DN *sdn;
44
45
bool group;
45
46
} MemberofEntryInfo;
46
47
47
48
There are three new multi-valued configuration attributes that can be set in: **cn=MemberOf Plugin,cn=plugins,cn=config**:
NOTE: You would not want to use both scopes at the same time: memberOfSpecificGroup & memberOfExcludeSpecificGroup. They are only listed as an example of its usage
67
+
CLI usage
68
+
69
+
dsconf slapd-INSTANCE plugin memberof set --specific-group-filter=(cn=group)
70
+
dsconf slapd-INSTANCE plugin memberof set --exclude-specific-group-filter=(cn=isolated group)
0 commit comments