[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Changing a dog into a tree with back-ldap
Hi all,
As this seems to have got a bit long, I'll put the main
questions at the top (they all refer to back-ldap):
Can I change the objectclass of an object when writing?
Can I strip out objectclass lines with "map objectclass xx"?
Can the rewrite engine change the dn, object classes or attribute types?
Does the rewrite engine work as well with Chinese characters as with latin?
Is there a better way to transform objects than back-ldap?
End of summary and beginning of long message.
Thanks for any help,
Chris Nicol :o)
I'd like to transform objects between client and server, both when reading
and when writing. It seems back-ldap can do some (but not all?) of the
things I want. I've read the man page and run a few tests (with version
2.1.8). Any advice on how to make it do what I want would be appreciated
(including "Start coding at ...").
If I understand correctly, back-ldap was designed to redirect requests to
other servers and manipulate dns to make this invisible to the client.
However, it can also (or might also be able to):
1) change attribute names
The "map attribute" directive allows my client to see "attribute1: abc" as
"attribute2: abc"
It also allows the client to write "attribute2: cde" and have it appear in
the target as "attribute1: cde"
2) change object classes
I've got back-ldap to present "objectclass: dog" as "objectclass: cat" but
it will not write a cat as a dog. Is this intended, or is it a bug? This
is my main problem.
3) remove attributes when reading
back-ldap removes attributes which are not in its schema. Fine.
You can also specify attributes to remove in slapd.conf.
4) add attributes when writing
As far as I can tell this is impossible and not intended.
5) remove objectclasses when reading
I'd like to be able to transform top/animal/dog into top/tree. This
would mean changing "dog" or "animal" into "tree" (see 2 above) and
stripping the other class out. The man page implies that this is
possible ("map objectclass animal") but it didn't do what I expected
(I think I got an object class line with no value).
6) add objectclasses when writing
As far as I can tell this is impossible and not intended.
7) do just about anything to text values
I haven't tested the "rewrite engine" - but I think it's intended only for
modifying text attribute values. Can it also manipulate the dn,
objectclasses or attribute types? Are there any particular considerations
for multi-byte character strings?