[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
glue and other overlays
I'm having problems in adding overlays to glued databases in 2.3
(actually, in HEAD) code. I want to glue together multiple instances of
back-ldap that must rewrite the DN of requests. I can do it this way:
--------
# global
overlay rwm
rwm-suffixmassage dc=example,dc=com
database ldap
suffix ou=Meta,o=Example,c=US
database ldap
suffix o=Example,c=US
overlay glue
glue-sub ou=Meta,o=Example,c=US
--------
which is fine if the two database can share the same rewriting; but in
few cases specific rewriting might be required, and I'd like to be able
to do things like
--------
database ldap
suffix ou=Meta,o=Example,c=US
overlay rwm
rwm-suffixmassage ou=Meta,dc=example,dc=com
database ldap
suffix o=Example,c=US
overlay rwm
rwm-suffixmassage dc=example,dc=com
overlay glue
glue-sub ou=Meta,o=Example,c=US
--------
but it doesn't work; I can search for "ou=Meta,dc=example,dc=com", but I
get noSuchObject for "dc=example,dc=com". I suspect a misuse, since I
recall reading that per-database overlays are not honored when the glue
overlay is used, but I can't find that message. What I've noticed is
that if I stack an overlay before the glue overlay it doesn't get called
because the glue overlay directly calls the underlying database after
resolving the most appropriate one; so
--------
#subordinate instances...
database ldap
suffix o=Example,c=US
overlay rwm
rwm-suffixmassage dc=example,dc=com
overlay glue
glue-sub ou=Meta,o=Example,c=US
--------
is equivalent to
--------
#subordinate instances...
database ldap
suffix o=Example,c=US
# bypassed
# overlay rwm
# rwm-suffixmassage dc=example,dc=com
overlay glue
glue-sub ou=Meta,o=Example,c=US
--------
I tried to use a trick, i.e. to put the rwm __after__ the glue overlay,
but this doesn't work because the rewritten DN is used to select the
subordinate, and thus it fails:
--------
#subordinate instances...
database ldap
suffix o=Example,c=US
overlay glue
glue-sub ou=Meta,o=Example,c=US
overlay rwm
rwm-suffixmassage dc=example,dc=com
--------
In fact, in this case the "glue-sub" instance should rather be "glue-sub
ou=Meta,dc=example,dc=com", but in this case slapd fails when reading
the configuration, because the first suberdinate has suffix
"ou=Meta,o=Example,c=US"; I've worked it around by using both suffixes
in each database, the one ending with "dc=example,dc=com" being required
only to correctly parse the "glue-sub" directive. But there's something
wrong yet, so that the databases are not correctly glued.
p.
--
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497