Macro ACI Syntax
203
NOTE
When using any macro, you
always
need a target definition that contains the
($dn)
macro.
You can combine the
($dn)
macro and the
($attr.
attrName
)
macro.
6.10.2.1. Macro Matching for ($dn)
The
($dn)
macro is replaced by the matching part of the resource targeted in an
LDAP request. For example, you have an LDAP request targeted at the
cn=all,
ou=groups,dc=subdomain1,dc=hostedCompany1,dc=example,dc=com
entry and an ACI that
defines the target as follows:
(target="ldap:///ou=Groups,($dn),dc=example,dc=com")
The
($dn)
macro matches with
dc=subdomain1, dc=hostedCompany1
.
When the subject of the ACI also uses
($dn)
, the substring that matches the target is used to expand
the subject. For example:
aci: (target="ldap:///ou=*,($dn),dc=example,dc=com")
(targetattr = "*") (version 3.0; acl "Domain access"; allow (read,search)
groupdn="ldap:///cn=DomainAdmins,ou=Groups,($dn),dc=example,dc=com";)
In this case, if the string matching
($dn)
in the target is
dc=subdomain1, dc=hostedCompany1
,
then the same string is used in the subject. The ACI is then expanded as follows:
aci: (target="ldap:///ou=Groups,dc=subdomain1,dc=hostedCompany1,
dc=example,dc=com") (targetattr = "*") (version 3.0; acl "Domain
access"; allow (read,search) groupdn="ldap:///cn=DomainAdmins,ou=Groups,
dc=subdomain1,dc=hostedCompany1,dc=example,dc=com";)
Once the macro has been expanded, Directory Server evaluates the ACI following the normal process
to determine whether access is granted.
6.10.2.2. Macro Matching for [$dn]
The matching mechanism for
[$dn]
is slightly different than for
($dn)
. The DN of the targeted
resource is examined several times, each time dropping the left-most RDN component, until a match
is found.
For example, you have an LDAP request targeted at the
cn=all,ou=groups,
dc=subdomain1,dc=hostedCompany1,dc=example,dc=com
subtree and the following ACI:
aci: (target="ldap:///ou=Groups,($dn),dc=example,dc=com")
(targetattr = "*") (version 3.0; acl "Domain access"; allow (read,search)
groupdn="ldap:///cn=DomainAdmins,ou=Groups,[$dn],dc=example,dc=com";)
The steps for expanding this ACI are as follows:
1.
($dn)
in the target matches
dc=subdomain1,dc=hostedCompany1
.
Содержание DIRECTORY SERVER 8.0
Страница 18: ...xviii ...
Страница 29: ...Configuring the Directory Manager 11 6 Enter the new password and confirm it 7 Click Save ...
Страница 30: ...12 ...
Страница 112: ...94 ...
Страница 128: ...110 ...
Страница 190: ...Chapter 6 Managing Access Control 172 4 Click New to open the Access Control Editor ...
Страница 224: ...206 ...
Страница 324: ...306 ...
Страница 334: ...316 ...
Страница 358: ...340 ...
Страница 410: ...392 ...
Страница 420: ...402 ...
Страница 444: ...426 ...
Страница 454: ...436 ...
Страница 464: ...446 ...
Страница 484: ...466 ...
Страница 512: ...494 ...
Страница 522: ...504 ...