⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slapd.access.5

📁 ldap服务器源码
💻 5
📖 第 1 页 / 共 2 页
字号:
The special.B ipstyle interprets the pattern as .BR <peername>=<ip>[%<mask>][{<n>}] ,where.B <ip>and .B <mask>are dotted digit representations of the IP and the mask, while.BR <n> ,delimited by curly brackets, is an optional port.When checking access privileges, the IP portion of the.BR peername is extracted, eliminating the.B "IP="prefix and the.B ":<port>"part, and it is compared against the.B <ip>portion of the pattern after masking with.BR <mask> .As an example, .B peername.ip=127.0.0.1allows connections only from localhost,.B peername.ip=192.168.1.0%255.255.255.0 allows connections from any IP in the 192.168.1 class C domain, and.B peername.ip=192.168.1.16%255.255.255.240{9009}allows connections from any IP in the 192.168.1.[16-31] range of the same domain, only if port 9009 is used.The special .B pathstyle eliminates the .B "PATH="prefix from the .B peernamewhen connecting through a named pipe, and performs an exact match on the given pattern.The.BR <domain>clause also allows the.B subtreestyle, which succeeds when a fully qualified name exactly matches the.BR domainpattern, or its trailing part, after a .BR dot ,exactly matches the .BR domainpattern.The .B expandstyle is allowed, implying an.B exact match with submatch expansion; the use of .B expand as a style modifier is considered more appropriate.As an example,.B domain.subtree=example.comwill match www.example.com, but will not match www.anotherexample.com.The.B domainof the contacting host is determined by performing a DNS reverse lookup.As this lookup can easily be spoofed, use of the.B domainstatement is strongly discouraged.  By default, reverse lookups are disabled.The optional.B domainstylequalifier of the.B <domain>clause allows a.B modifieroption; the only value currently supported is.BR expand ,which causes substring substitution of submatches to take place even ifthe .B domainstyleis not .BR regex ,much like the analogous usage in .B <dn>clause..LPThe statement.B set=<pattern>is undocumented yet..LPThe statement.B aci[=<attrname>]means that the access control is determined by the values in the.B attrnameof the entry itself.The optional.B <attrname>indicates what attributeType holds the ACI information in the entry.By default, the .B OpenLDAPacioperational attribute is used.ACIs are experimental; they must be enabled at compile time..LPThe statement.B dynacl/<name>[/<options>][.<dynstyle>][=<pattern>]means that access checking is delegated to the admin-defined methodindicated by.BR <name> ,which can be registered at run-time by means of the.B moduleloadstatement.The fields.BR <options> ,.B <dynstyle>and.B <pattern>are optional, and are directly passed to the registered parsing routine.Dynacl is experimental; it must be enabled at compile time.If dynacl and ACIs are both enabled, ACIs are cast into the dynacl scheme,where .B <name>=aciand, optionally,.BR <patten>=<attrname> .However, the original ACI syntax is preserved for backward compatibility..LPThe statements.BR ssf=<n> ,.BR transport_ssf=<n> ,.BR tls_ssf=<n> ,and.BR sasl_ssf=<n>set the minimum required Security Strength Factor (ssf) neededto grant access.  The value should be positive integer..SH THE <ACCESS> FIELDThe field.B <access> ::= [[real]self]{<level>|<priv>}determines the access level or the specific access privileges the.B who field will have.Its component are defined as.LP.nf	<level> ::= none|disclose|auth|compare|search|read|write	<priv> ::= {=|+|-}{w|r|s|c|x|d|0}+.fi.LPThe modifier.B selfallows special operations like having a certain access level or privilegeonly in case the operation involves the name of the user that's requestingthe access.It implies the user that requests access is authorized.The modifier.B realselfrefers to the authenticated DN as opposed to the authorized DN of the.B selfmodifier.An example is the.B selfwriteaccess to the member attribute of a group, which allows one to add/deleteits own DN from the member list of a group, without affecting other members..LPThe .B level access model relies on an incremental interpretation of the accessprivileges.The possible levels are.BR none ,.BR disclose ,.BR auth ,.BR compare ,.BR search ,.BR read ,and.BR write .Each access level implies all the preceding ones, thus .B writeaccess will imply all accesses..LPThe.B none access level disallows all access including disclosure on error..LPThe.B discloseaccess level allows disclosure of information on error..LPThe .B authaccess level means that one is allowed access to an attribute to performauthentication/authorization operations (e.g..BR bind )with no other access.This is useful to grant unauthenticated clients the least possible access level to critical resources, like passwords..LPThe.B privaccess model relies on the explicit setting of access privilegesfor each clause.The.B =sign resets previously defined accesses; as a consequence, the final access privileges will be only those defined by the clause.The .B +and.B -signs add/remove access privileges to the existing ones.The privileges are.B wfor write,.B rfor read,.B s for search,.B c for compare,.B xfor authentication, and.B dfor disclose.More than one of the above privileges can be added in one statement..B 0indicates no privileges and is used only by itself (e.g., +0).If no access is given, it defaults to .BR +0 ..SH THE <CONTROL> FIELDThe optional field.B <control>controls the flow of access rule application.It can have the forms.LP.nf	stop	continue	break.fi.LPwhere.BR stop ,the default, means access checking stops in case of match.The other two forms are used to keep on processing access clauses.In detail, the.B continueform allows for other .B <who>clauses in the same .B <access>clause to be considered, so that they may result in incrementally alteringthe privileges, while the.B breakform allows for other.B <access>clauses that match the same target to be processed.Consider the (silly) example.LP.nf	access to dn.subtree="dc=example,dc=com" attrs=cn		by * =cs break	access to dn.subtree="ou=People,dc=example,dc=com"		by * +r.fi.LPwhich allows search and compare privileges to everybody underthe "dc=example,dc=com" tree, with the second rule allowingalso read in the "ou=People" subtree,or the (even more silly) example.LP.nf	access to dn.subtree="dc=example,dc=com" attrs=cn		by * =cs continue		by users +r.fi.LPwhich grants everybody search and compare privileges, and adds readprivileges to authenticated clients..LPOne useful application is to easily grant write privileges to an.B updatednthat is different from the.BR rootdn .In this case, since the.B updatednneeds write access to (almost) all data, one can use.LP.nf	access to *		by dn.exact="cn=The Update DN,dc=example,dc=com" write		by * break.fi.LPas the first access rule.As a consequence, unless the operation is performed with the .B updatednidentity, control is passed straight to the subsequent rules..SH OPERATION REQUIREMENTSOperations require different privileges on different portions of entries.The following summary applies to primary database backends such asthe BDB and HDB backends.   Requirements for other backends may(and often do) differ..LPThe.B addoperation requires.B write (=w)privileges on the pseudo-attribute .B entryof the entry being added, and .B write (=w)privileges on the pseudo-attribute.B childrenof the entry's parent.When adding the suffix entry of a database, write access to.B childrenof the empty DN ("") is required..LPThe .B bindoperation, when credentials are stored in the directory, requires .B auth (=x)privileges on the attribute the credentials are stored in (usually.BR userPassword )..LPThe.B compareoperation requires .B compare (=c)privileges on the attribute that is being compared..LPThe.B deleteoperation requires.B write (=w)privileges on the pseudo-attribute.B entry of the entry being deleted, and.B write (=w)privileges on the.B childrenpseudo-attribute of the entry's parent..LPThe.B modifyoperation requires .B write (=w)privileges on the attributes being modified..LPThe.B modrdnoperation requires.B write (=w)privileges on the pseudo-attribute.B entryof the entry whose relative DN is being modified,.B write (=w)privileges on the pseudo-attribute.B childrenof the old and new entry's parents, and.B write (=w)privileges on the attributes that are present in the new relative DN..B Write (=w)privileges are also required on the attributes that are present in the old relative DN if .B deleteoldrdnis set to 1..LPThe.B searchoperation, requires .B search (=s)privileges on the .B entrypseudo-attribute of the searchBase (NOTE: this was introduced with 2.3).Then, for each entry, it requires.B search (=s)privileges on the attributes that are defined in the filter.The resulting entries are finally tested for .B read (=r)privileges on the pseudo-attribute.B entry(for read access to the entry itself)and for.B read (=r)access on each value of each attribute that is requested.Also, for each.B referralobject used in generating continuation references, the operation requires.B read (=r)access on the pseudo-attribute.B entry(for read access to the referral object itself),as well as.B read (=r)access to the attribute holding the referral information(generally the.B refattribute)..LPSome internal operations and some.B controlsrequire specific access privileges.The.B authzIDmapping and the .B proxyAuthzcontrol require.B auth (=x)privileges on all the attributes that are present in the search filterof the URI regexp maps (the right-hand side of the.B authz-regexpdirectives)..B Auth (=x)privileges are also required on the.B authzToattribute of the authorizing identity and/or on the .B authzFromattribute of the authorized identity..LPAccess control to search entries is checked by the frontend,so it is fully honored by all backends; for all other operationsand for the discovery phase of the search operation,full ACL semantics is only supported by the primary backends, i.e..BR back-bdb (5),and.BR back-hdb (5).Some other backend, like.BR back-sql (5),may fully support them; others may only support a portion of the described semantics, or even differ in some aspects.The relevant details are described in the backend-specific man pages..SH CAVEATSIt is strongly recommended to explicitly use the most appropriate.B <dnstyle>in.B <what>and.B <who>clauses, to avoid possible incorrect specifications of the access rules as well as for performance (avoid unnecessary regex matching when an exactmatch suffices) reasons..LPAn administrator might create a rule of the form:.LP.nf	access to dn.regex="dc=example,dc=com"		by ....fi.LPexpecting it to match all entries in the subtree "dc=example,dc=com".However, this rule actually matches any DN which contains anywherethe substring "dc=example,dc=com".  That is, the rule matches both"uid=joe,dc=example,dc=com" and "dc=example,dc=com,uid=joe"..LPTo match the desired subtree, the rule would be more preciselywritten:.LP.nf	access to dn.regex="^(.+,)?dc=example,dc=com$"		by ....fi.LPFor performance reasons, it would be better to use the subtree style..LP.nf	access to dn.subtree="dc=example,dc=com"		by ....fi.LPWhen writing submatch rules, it may be convenient to avoid unnecessary.B regex.B <dnstyle>use; for instance, to allow access to the subtree of the user that matches the.B <what>clause, one could use.LP.nf	access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"		by dn.regex="^uid=$2,dc=example,dc=com$$" write		by ....fi.LPHowever, since all that is required in the .B <by>clause is substring expansion, a more efficient solution is.LP.nf	access to dn.regex="^(.+,)?uid=([^,]+),dc=example,dc=com$"		by dn.exact,expand="uid=$2,dc=example,dc=com" write		by ....fi.LPIn fact, while a.B <dnstyle>of.B regeximplies substring expansion, .BR exact ,as well as all the other DN specific.B <dnstyle>values, does not, so it must be explicitly requested..LP.SH FILES.TPETCDIR/slapd.confdefault slapd configuration file.SH SEE ALSO.BR slapd (8),.BR slapd-* (5),.BR slapacl (8),.BR regex (7),.BR re_format (7).LP"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/).SH ACKNOWLEDGEMENTS.B OpenLDAPis developed and maintained by The OpenLDAP Project (http://www.openldap.org/)..B OpenLDAPis derived from University of Michigan LDAP 3.3 Release.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -