For example, allow read access for any entry that contains an organizationalUnit attribute that is set to Marketing.

Filtered access control rules allow predefined levels of access. Suppose the directory contains home address and telephone number information. Some people want to publish this information, while others want to be unlisted. There are several ways to address that:

Create an attribute on every user's directory entry called publishHomeContactInfo.

Set an access control rule that grants read access to the homePhone and homePostalAddress attributes only for entries whose publishHomeContactInfo attribute is set to true (meaning enabled). Use an LDAP search filter to express the target for this rule.

Allow the directory users to change the value of their own publishHomeContactInfo attribute to either true or false. In this way, the directory user can decide whether this information is publicly available.

For more information about using LDAP search filters and on using LDAP search filters with ACIs, refer to the HP-UX Directory Server administrator guide.

8.7.3 Viewing ACIs: Get effective rights

It can be necessary to view access controls set on an entry to grant fine-grained access control or for efficient entry management. Get effective rights is an extended ldapsearch that returns the access control permissions set on each attribute within an entry, and allows an LDAP client to determine what operations the server's access control configuration allows a user to perform.

The access control information is divided into two groups of access: rights for an entry and rights for an attribute. "Rights for an entry" means the rights, such as modify or delete, that are limited to that specific entry. "Rights for an attribute" means the access right to every instance of that attribute throughout the directory.

This kind of detailed access control may be necessary in the following types of situations:

An administrator can use the get effective rights command for minute access control, such as allowing certain groups or users access to entries and restricting others. For example, members of the QA Managers group may have the right to search and read attributes such as title and salary, but only HR Group members have the rights to modify or delete them.

A user can use the get effective rights option to determine what attributes they can view or modify on their personal entry. For example, a user should have access to attributes such as homePostalAddress and cn, but may only have read access to title and salary.

An ldapsearch executed using the -Jswitch returns the access controls on a particular entry as part of the normal search results. The following search the rights that user Ted Morris has to his personal entry:

ldapsearch -p 389 -h localhost -D "uid=tmorris, ou=people,dc=example,dc=com" -w password -b "uid=tmorris, ou=people,dc=example,dc=com" -J "1.3.6.1.4.1.42.2.27.9.5.2:true:dn:uid=tmorris, ou=people,dc=example,dc=com" "(objectClass=*)"

version: 1

dn: uid=tmorris, ou=People, dc=example, dc=com

givenName: Ted

sn: Morris

ou: Accounting

ou: People

l: Santa Clara

manager: uid=dmiller, ou=People, dc=example, dc=com

roomNumber: 4117 mail: tmorris@example.com

facsimileTelephoneNumber: +1 408 555 5409

objectClass: top

8.7 Designing access control 121