[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: map custom attribute to another non custom attribute
- To: openldap-software@openldap.org
- Subject: Re: map custom attribute to another non custom attribute
- From: "P. Martinez" <martinezino@googlemail.com>
- Date: Sat, 10 Feb 2007 19:58:14 +0100
- In-reply-to: <b0459d5c0701220643s64fd09efh79de70350fcbce71@mail.gmail.com>
- References: <cf9f93c67d8a64fac2eecc5975a097b5@googlemail.com> <b0459d5c0701220643s64fd09efh79de70350fcbce71@mail.gmail.com>
Am 22.01.2007 um 15:43 schrieb matthew sporleder:
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)
Thank you.
I work with OSX and the shipped version
(2.1.22) don't support rwm.
I compiled my own openldap now. With:
./configure --enable-slapd \
--enable-slurpd \
--enable-wrappers \
--enable-bdb \
--enable-hdb \
--enable-ldap \
--enable-ldbm \
--enable-ldbm-api=berkeley \
--enable-meta \
--enable-monitor \
--enable-null \
--enable-rwm \
--enable-shared \
--enable-static \
--with-pic \
--without-kerberos \
--disable-perl \
--enable-dynamic
LDFLAGS="-L/usr/local/BerkeleyDB.4.3/lib"
CPPFLAGS="-I/usr/local/BerkeleyDB.4.3/include"
After setting all up - i was very impressed how fast
it is now (2.1.22 > 2.3.32) - compliment, by the way.
So, i added into slapd.conf:
overlay rwm
map attribute labeledURI URL
before any database statement.
Doing operations on this labeledURI, URL
attributes, shows me that data is showed
as labeledURI and URL stays "empty". Well
if i disable the overlay all data actually
is stored into URL, so far okay.
I was thinking about seeing my data on both
places. Internally it can be store lets say
into URL. but if i search for URL _or_ labeledURI
it should show the same contens. Possible ?
Thanks for hints
P.M.