[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Per-objectclass attribute mapping with slapd-meta

Daniel Montero Motilla wrote:
Ok, but taking apart the possibility of explicitly mapping per
objectclass, in the example I'm exposing I don't understand the error
checking back-meta does, I map foreign 'givenName' to local 'cn' and
foreign 'name' to local 'cn', what would be the problem with that?
(that is in fact the behaviour I'm looking for).

You have the configuration backwards then, since it should be map attribute <local> <remote>

but that's kind of moot. This function is a "mapping" in the mathematical sense - it is 1-to-1 and onto. And it must be, because it is used bidirectionally. I.e., if the backend receives a request for the local attribute, it must map it to the remote before forwarding the request. If you allowed multiple maps to refer to the same local attribute, it would be impossible to decide which to use when forwarding the request.

Since you cannot determine the objectclasses that are involved in the attribute list of a search request, there is no way to provide per-objectclass mapping in that direction.

Nor can you unambiguously do this in the remote-to-local direction since an entry can belong to many objectclasses at once.



2006/11/1, Pierangelo Masarati <ando@sys-net.it>:
Daniel Montero Motilla wrote:
> Hi, i'm trying to accomplish this kind of attribute and objectclass
> mapping with slapd-meta:
> map objectclass inetOrgPerson User
> map attribute cn givenName
> map objectclass groupOfNames Group
> map attribute cn name
> But it seems that attribute mapping affects attributes of all
> objectclasses, so I obtain a "duplicate attribute mapping" error with
> lines 2 and 4. How can I establish a per-objectclass attribute mapping
> so I don't obtain that error?

You can't (AFAIK).


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it

-- -- Howard Chu Chief Architect, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc OpenLDAP Core Team http://www.openldap.org/project/