HP UX Red Hat Direry Server Software manual Macro Matching for $attr.attrName, 240

Models: UX Red Hat Direry Server Software

1 638
Download 638 pages 23.73 Kb
Page 260
Image 260

Chapter 6. Managing Access Control

For example, consider the following ACI:

aci: (target="ldap:///ou=*, ($dn),dc=example,dc=com") (targetattr="*")(targetfilter=(objectClass=nsManagedDomain)) (version 3.0; acl "Domain access"; allow (read,search) groupdn="ldap:///cn=DomainAdmins,ou=Groups,[$dn],dc=example,dc=com";)

It grants access to the members of cn=DomainAdmins,ou=Groups,

dc=hostedCompany1,dc=example,dc=com to all of the subdomains under dc=hostedCompany1, so an administrator belonging to that group could access a subtree like ou=people, dc=subdomain1.1, dc=subdomain1.

However, at the same time, members of cn=DomainAdmins,ou=Groups, dc=subdomain1.1 would be denied access to the ou=people,dc=hostedCompany1 and

ou=people,dc=hostedCompany1 nodes.

10.2.3. Macro Matching for ($attr.attrName)

The ($attr.attrName) macro is always used in the subject part of a DN. For example, define the following roledn:

roledn = "ldap:///cn=DomainAdmins,($attr.ou)"

Now, assume the server receives an LDAP operation targeted at the following entry:

dn: cn=Jane Doe, ou=People, dc=HostedCompany1, dc=example,dc=com

cn: Jane Doe

sn: Doe

ou: Engineering, dc=HostedCompany1, dc=example,dc=com

...

In order to evaluate the roledn part of the ACI, the server looks at the ou attribute stored in the targeted entry and uses the value of this attribute to expand the macro. Therefore, in the example, the roledn is expanded as follows:

roledn =

"ldap:///cn=DomainAdmins,ou=Engineering,dc=HostedCompany1,dc=example,dc=com"

The Directory Server then evaluates the ACI according to the normal ACI evaluation algorithm.

When an attribute is multi-valued, each value is used to expand the macro, and the first one that provides a successful match is used. For example:

dn: cn=Jane Doe,ou=People,dc=HostedCompany1,dc=example,dc=com

cn: Jane Doe

sn: Doe

ou: Engineering, dc=HostedCompany1,dc=example,dc=com

240

Page 260
Image 260
HP UX Red Hat Direry Server Software manual Macro Matching for $attr.attrName, For example, consider the following ACI, 240