2004-03-18 08:36:50 +08:00
|
|
|
.TH SLAPD-RELAY 5 "RELEASEDATE" "OpenLDAP LDVERSION"
|
|
|
|
.SH NAME
|
|
|
|
slapd-relay \- relay backend to slapd
|
|
|
|
.SH SYNOPSIS
|
|
|
|
ETCDIR/slapd.conf
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The primary purpose of this
|
|
|
|
.BR slapd (8)
|
|
|
|
backend is to map a naming context defined in a database
|
|
|
|
running in the same
|
|
|
|
.BR slapd (8)
|
|
|
|
instance into a virtual naming context, with attributeType
|
|
|
|
and objectClass manipulation, if required.
|
|
|
|
It requires the
|
2007-08-07 07:22:19 +08:00
|
|
|
.BR slapo-rwm (5)
|
|
|
|
overlay.
|
2004-03-18 08:36:50 +08:00
|
|
|
.LP
|
|
|
|
This backend and the above mentioned overlay are experimental.
|
|
|
|
.SH CONFIGURATION
|
2004-07-26 07:16:40 +08:00
|
|
|
The following
|
2004-03-18 08:36:50 +08:00
|
|
|
.B slapd.conf
|
2004-07-26 07:16:40 +08:00
|
|
|
directives apply to the relay backend database.
|
2004-03-18 08:36:50 +08:00
|
|
|
That is, they must follow a "database relay" line and come before any
|
|
|
|
subsequent "backend" or "database" lines.
|
|
|
|
Other database options are described in the
|
|
|
|
.BR slapd.conf (5)
|
2004-07-26 07:16:40 +08:00
|
|
|
manual page; only the
|
|
|
|
.B suffix
|
2007-08-07 07:22:19 +08:00
|
|
|
directive is allowed by the
|
2004-07-26 07:16:40 +08:00
|
|
|
.I relay
|
|
|
|
backend.
|
2004-03-18 08:36:50 +08:00
|
|
|
.TP
|
2007-08-07 07:22:19 +08:00
|
|
|
.B relay <real naming context>
|
2004-03-18 08:36:50 +08:00
|
|
|
The naming context of the database that is presented
|
|
|
|
under a virtual naming context.
|
2004-07-26 07:16:40 +08:00
|
|
|
The presence of this directive implies that one specific database,
|
|
|
|
i.e. the one serving the
|
|
|
|
.BR "real naming context" ,
|
2004-03-18 08:36:50 +08:00
|
|
|
will be presented under a virtual naming context.
|
2007-08-07 07:22:19 +08:00
|
|
|
|
|
|
|
.SH MASSAGING
|
|
|
|
The
|
|
|
|
.B relay
|
|
|
|
database does not automatically rewrite the naming context
|
|
|
|
of requests and responses.
|
|
|
|
For this purpose, the
|
|
|
|
.BR slapo-rwm (5)
|
|
|
|
overlay must be explicitly instantiated, and configured
|
|
|
|
as appropriate.
|
|
|
|
Usually, the
|
|
|
|
.B rwm-suffixmassage
|
|
|
|
directive suffices if only naming context rewriting is required.
|
2004-07-26 07:16:40 +08:00
|
|
|
|
|
|
|
.SH ACCESS RULES
|
|
|
|
One important issue is that access rules are based on the identity
|
|
|
|
that issued the operation.
|
|
|
|
After massaging from the virtual to the real naming context, the
|
2005-04-09 08:44:17 +08:00
|
|
|
frontend sees the operation as performed by the identity in the
|
2004-07-26 07:16:40 +08:00
|
|
|
real naming context.
|
|
|
|
Moreover, since
|
|
|
|
.B back-relay
|
|
|
|
bypasses the real database frontend operations by short-circuiting
|
2007-08-06 23:23:28 +08:00
|
|
|
operations through the internal backend API, the original database
|
2004-07-26 07:16:40 +08:00
|
|
|
access rules do not apply but in selected cases, i.e. when the
|
|
|
|
backend itself applies access control.
|
|
|
|
As a consequence, the instances of the relay database must provide
|
|
|
|
own access rules that are consistent with those of the original
|
|
|
|
database, possibly adding further specific restrictions.
|
|
|
|
So, access rules in the
|
|
|
|
.B relay
|
|
|
|
database must refer to identities in the real naming context.
|
|
|
|
Examples are reported in the EXAMPLES section.
|
2004-03-18 08:36:50 +08:00
|
|
|
|
|
|
|
.SH SCENARIOS
|
|
|
|
.LP
|
|
|
|
If no
|
|
|
|
.B relay
|
|
|
|
directive is given, the
|
2004-07-26 07:16:40 +08:00
|
|
|
.I relay
|
2004-03-18 08:36:50 +08:00
|
|
|
database does not refer to any specific database, but the most
|
|
|
|
appropriate one is looked-up after rewriting the request DN
|
|
|
|
for the operation that is being handled.
|
|
|
|
.LP
|
|
|
|
This allows to write carefully crafted rewrite rules that
|
|
|
|
cause some of the requests to be directed to one database, and
|
|
|
|
some to another; e.g., authentication can be mapped to one
|
2004-07-26 07:16:40 +08:00
|
|
|
database, and searches to another, or different target databases
|
|
|
|
can be selected based on the DN of the request, and so.
|
2004-03-18 08:36:50 +08:00
|
|
|
.LP
|
|
|
|
Another possibility is to map the same operation to different
|
|
|
|
databases based on details of the virtual naming context,
|
|
|
|
e.g. groups on one database and persons on another.
|
|
|
|
.LP
|
|
|
|
.SH EXAMPLES
|
|
|
|
To implement a plain virtual naming context mapping
|
|
|
|
that refers to a single database, use
|
|
|
|
.LP
|
|
|
|
.nf
|
2007-08-07 07:22:19 +08:00
|
|
|
database relay
|
|
|
|
suffix "dc=virtual,dc=naming,dc=context"
|
|
|
|
relay "dc=real,dc=naming,dc=context"
|
|
|
|
overlay rwm
|
|
|
|
rwm-suffixmassage "dc=real,dc=naming,dc=context"
|
2004-03-18 08:36:50 +08:00
|
|
|
.fi
|
|
|
|
.LP
|
|
|
|
To implement a plain virtual naming context mapping
|
|
|
|
that looks up the real naming context for each operation, use
|
|
|
|
.LP
|
|
|
|
.nf
|
2007-08-07 07:22:19 +08:00
|
|
|
database relay
|
|
|
|
suffix "dc=virtual,dc=naming,dc=context"
|
|
|
|
overlay rwm
|
|
|
|
rwm-suffixmassage "dc=real,dc=naming,dc=context"
|
2004-03-18 08:36:50 +08:00
|
|
|
.fi
|
|
|
|
.LP
|
2004-07-26 07:16:40 +08:00
|
|
|
This is useful, for instance, to relay different databases that
|
|
|
|
share the terminal portion of the naming context (the one that
|
|
|
|
is rewritten).
|
|
|
|
.LP
|
2004-03-18 08:36:50 +08:00
|
|
|
To implement the old-fashioned suffixalias, e.g. mapping
|
|
|
|
the virtual to the real naming context, but not the results
|
|
|
|
back from the real to the virtual naming context, use
|
|
|
|
.LP
|
|
|
|
.nf
|
2007-08-07 07:22:19 +08:00
|
|
|
database relay
|
|
|
|
suffix "dc=virtual,dc=naming,dc=context"
|
|
|
|
relay "dc=real,dc=naming,dc=context"
|
|
|
|
overlay rwm
|
|
|
|
rwm-rewriteEngine on
|
|
|
|
rwm-rewriteContext default
|
|
|
|
rwm-rewriteRule "dc=virtual,dc=naming,dc=context"
|
|
|
|
"dc=real,dc=naming,dc=context" ":@"
|
|
|
|
rwm-rewriteContext searchFilter
|
|
|
|
rwm-rewriteContext searchEntryDN
|
|
|
|
rwm-rewriteContext searchAttrDN
|
|
|
|
rwm-rewriteContext matchedDN
|
2004-03-18 08:36:50 +08:00
|
|
|
.fi
|
|
|
|
.LP
|
2007-08-07 07:22:19 +08:00
|
|
|
Note that the
|
|
|
|
.BR slapo-rwm (5)
|
|
|
|
overlay is instantiated, but the rewrite rules are written explicitly,
|
|
|
|
rather than automatically as with the
|
|
|
|
.B rwm-suffixmassage
|
|
|
|
statement, to map all the virtual to real naming context data flow,
|
|
|
|
but none of the real to virtual.
|
2004-07-26 07:16:40 +08:00
|
|
|
.LP
|
|
|
|
Access rules:
|
|
|
|
.LP
|
|
|
|
.nf
|
2007-08-07 07:22:19 +08:00
|
|
|
database bdb
|
|
|
|
suffix "dc=example,dc=com"
|
2004-07-26 07:16:40 +08:00
|
|
|
# skip...
|
|
|
|
access to dn.subtree="dc=example,dc=com"
|
|
|
|
by dn.exact="cn=Supervisor,dc=example,dc=com" write
|
|
|
|
by * read
|
|
|
|
|
2007-08-07 07:22:19 +08:00
|
|
|
database relay
|
|
|
|
suffix "o=Example,c=US"
|
|
|
|
relay "dc=example,dc=com"
|
|
|
|
overlay rwm
|
|
|
|
rwm-suffixmassage "dc=example,dc=com"
|
2004-07-26 07:16:40 +08:00
|
|
|
# skip ...
|
|
|
|
access to dn.subtree="o=Example,c=US"
|
|
|
|
by dn.exact="cn=Supervisor,dc=example,dc=com" write
|
|
|
|
by dn.exact="cn=Relay Supervisor,dc=example,dc=com" write
|
|
|
|
by * read
|
|
|
|
.fi
|
|
|
|
.LP
|
|
|
|
Note that, in both databases, the identities (the
|
|
|
|
.B <who>
|
|
|
|
clause) are in the
|
|
|
|
.BR "real naming context" ,
|
|
|
|
i.e.
|
|
|
|
.BR "`dc=example,dc=com'" ,
|
|
|
|
while the targets (the
|
|
|
|
.B <what>
|
|
|
|
clause) are in the
|
|
|
|
.B real
|
|
|
|
and in the
|
|
|
|
.BR "virtual naming context" ,
|
|
|
|
respectively.
|
2005-04-09 08:44:17 +08:00
|
|
|
.SH ACCESS CONTROL
|
|
|
|
The
|
|
|
|
.B relay
|
|
|
|
backend does not honor any of the access control semantics described in
|
|
|
|
.BR slapd.access (5);
|
|
|
|
all access control is delegated to the relayed database(s).
|
|
|
|
Only
|
|
|
|
.B read (=r)
|
|
|
|
access to the
|
|
|
|
.B entry
|
|
|
|
pseudo-attribute and to the other attribute values of the entries
|
|
|
|
returned by the
|
|
|
|
.B search
|
|
|
|
operation is honored, which is performed by the frontend.
|
2004-03-18 08:36:50 +08:00
|
|
|
.SH FILES
|
|
|
|
.TP
|
|
|
|
ETCDIR/slapd.conf
|
|
|
|
default slapd configuration file
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR slapd.conf (5),
|
2004-07-26 07:16:40 +08:00
|
|
|
.BR slapo-rwm (5),
|
2004-03-18 08:36:50 +08:00
|
|
|
.BR slapd (8).
|