Migrating static groups to virtual static groups
About this task
In many cases, using virtual static groups in place of static groups can produce marked performance gains without having to update client applications. Migrating to virtual static groups varies depending on the original directory information tree (DIT), but the general approach involves identifying common membership traits for all members of each group and then expressing those traits in the form of an LDAP URL.
For this task, consider the following:
-
The common membership trait for all members of the
All Usersgroup is the parent distinguish name (DN)ou=People,dc=example,dc=com. -
In other cases, a common attribute might need to be used. For example, groups based on the location of its members could use the
llocation orststate attribute. -
The common case of an
All Usersgroup, which contains all entries under the parent DNou=People,dc=example,dc=com. -
When implemented as a virtual static group, this group can have a large membership set without incurring the overhead of a static group.
To migrate Oracle Directory Server Enterprise Edition static groups to virtual static groups:
Steps
-
Create a dynamic group.
Example:
dn: cn=Dynamic All Users,ou=Groups,dc=example,dc=com objectClass: top objectClass: groupOfURLs cn: Dynamic All Users memberURL: ldap:///ou=People,dc=example,dc=com??sub?(objectClass=person)
-
Create a virtual static group that references the dynamic group.
Example:
dn: cn=All Users,ou=Groups,dc=example,dc=com objectClass: top objectClass: groupOfUniqueNames objectClass: ds-virtual-static-group cn: All Users ds-target-group-dn: cn=Dynamic All Users,ou=Groups,dc=example,dc=com
-
To populate the
All Usersgroup withuniqueMembervirtual attributes, enable theVirtual Static uniqueMembervirtual attribute.Example:
$ bin/dsconfig set-virtual-attribute-prop --name "Virtual Static uniqueMember" \ --set enabled:true -
To confirm that the virtual static group is correctly configured, check a user’s membership in the group.
Example:
$ bin/ldapsearch --baseDN "cn=All Users,ou=Groups,dc=example,dc=com" \ --searchScope base "(uniqueMember=uid=user.0,ou=People,dc=example,dc=com)" 1.1Result:
dn: cn=All Users,ou=Groups,dc=example,dc=com
-
If a client application requires it, enable the ability to list all members of a virtual static group.
By default, this feature is disabled.
Example:
$ bin/dsconfig set-virtual-attribute-prop --name "Virtual Static uniqueMember" \ --set allow-retrieving-membership: trueYou can implement the virtual static group using the
groupOfNamesobject class instead ofgroupOfUniqueNames. To do this, update theVirtual Static memberconfiguration object instead of theVirtual Static uniqueMemberconfiguration object.