You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2010/07/22 17:28:25 UTC

ACI & Subentry interaction

  Hi,

today, I faced a small problem. Let me explain :

After having injected an AP, an AccessControl subentry, I tried to add a 
new entry which will be part of the subentry SubtreeSpecification. So 
far, so good, it was working in the trunk.

In my branch, it fails because I'm in the middle of some refactoring, so 
it's not the issue I'm facing.

The problem is that the ACI interceptor will ask the Subentry 
interceptor to evaluate if the added entry will be part of the subentry 
SS. Well, why not ? (I mean, it creates a heavy dependecy between two 
interceptors, something I dislike). The issue is that once added, we 
will go down the chain and as the ACI Interceptor is before the Subentry 
interceptor, when we will go through this one, we will evaluate again 
the entry.

That means for each added entry, it will be evaluated twice. Not exactly 
free...

Can we avoid such a duplication of work ?

I was thinking that as the Subentry system is totally transverse, we 
could move the evaluation part into the DirectoryService. The Subentry 
cache should also be part of the DirectoryService.

If we do so, we will remove the dependence between the two interceptors, 
which is a good thing. However, we won't avoid the double evaluation. 
What we need to do for that is to add a flag in the AddContext which 
will be set to true when the evaluation for this entry has occurred.

Just to be sure, anyone can tell me if I've missed anything ?

PS : ATM, I will keep the system as is, ie with the call to the subentry 
interceptor and double evaluation.

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