directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Adding EntryDN operational attribute
Date Fri, 07 Dec 2012 14:15:41 GMT
Le 12/7/12 4:55 AM, Kiran Ayyagari a écrit :
> On Fri, Dec 7, 2012 at 6:20 AM, Emmanuel Lécharny <elecharny@gmail.com>wrote:
>
>> Hi,
>>
>> I'm trying to add the entryDN operational attribute, as it's present in
>> OpenLDAP and we get it when setting up replication. This attribute is
>> computed on the fly, and can be used in attribute value assertion (cf
>> RFC 5020).
>>
>> We have to ways to implement this AT :
>> 1) In the OperationalAttributeInterceptor
>> 2) In the backend
>>
>> Here are the operation we have to do :
>>
>> Add operation : in any case, we must remove the EntryDN attribute, if
>> it's present, before we hit the backend
>> Modify operation : same thing
>> Rename operation : same thing
>> Move operation : nothing to do
>> Lookup operation : we have to add the entryDn, but only if the user has
>> requested it (+, or explicitely).
>> Search operation : for each entry, we have to add the EntryDn AT if
>> requested(+, or explicitely).
>>
>> I think it's easier, considering those constraints, to do the work, in
>> the backend. This may have some impact on the entry cache too.
>>
>> I will investigate a bit more on detail the two approach (I have played
>> a bit with both approaches, but haven't set my mind yet.
>>
>> any thoughts ?
>>
>> I prefer the first approach clubbed with modifying the
> BaseEntryFilteringCursor to inject
> entryDN attribute when requested

The pb, after having scrutinize the way a search is done, for every enry
we fetch from the backend, we do call AbstractBTreePartition.lookup( id,
Dn ), which pull the entry from the partition implementation (whatever
it is).

So it seems that it's the best place to inject the EntryDn.

Sadly, there is a big difference in the way we deal with the lookup(
LookupOperationContext ), as this method does filter the attributes,
when it's done in another place for the search (in
BaseEntryFilteringCursor.filterContents(), which should be shared with
the lookup( LookupOperationContext ) method...)

The attribute filter method should be factorized, put into a util class,
and used everywhere we need it.

Working on that...

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Mime
View raw message