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

Re: map custom attribute to another non custom attribute



On 1/19/07, P. Martinez <martinezino@googlemail.com> wrote:
Hello List,

before i start, i am very new to directory
services, therefore please be patient to
me. I am with myself ;)

I am writing an custom schema - and thought
about a way to mapping attributes.

attributeType ( OIDXXX NAME ( 'cn' 'commonName' )
                 SUP name )

Here we have two ways to query for entries - cn
and commonName, right.

My question: Is is possible to construct a
schema that maps attributes to another
attribute of a different objectclass/schema.

Why? - Lets say an application ask for
"unordinaryattributeName". Now i want to
map it to cn transparently. So i need only
to  manipulate cn fields etc.

This idea comes to me as a flash of genius.
But i hope that it is quite old and therefore
possible.


Although this might be possible, (I'm not sure how many NAME's you're allowed in a schema), openldap provides mechanisms to do this already. And you wouldn't have to hijack namespace, or get into other nasty things like that.

See slapo-rwm(5)
---
DESCRIPTION
      The  rwm overlay to slapd(8) performs basic DN/data rewrite and object-
      Class/attributeType mapping.  Its usage is mostly intended  to  provide
      virtual views of existing data either remotely, in conjunction with the
      proxy backend described in slapd-ldap(5), or  locally,  in  conjunction
      with the relay backend described in slapd-relay(5).