directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <>
Subject Re: Q: LookupFilter doesn't receive useful info
Date Wed, 15 Dec 2004 02:53:29 GMT
Mark Swanson wrote:

>>>All I want to do is this:
>>>modify an incoming request:
>>>1. dn: ou=mozilla,ou=contacts,uid=6760,dc=home2,dc=mark
>>>2. query: '(blah=a b)'
>>>so it looks like this:
>>>1. ou=super,ou=contacts,uid=6760,dc=home2,dc=mark
>>>2. '(cn=a b)'
>>>Then, do the reverse on the output (if anything).
>>Ok cool but this is a hack at the moment due to the state of Eve and the
>>fact that you cannot add interceptors without changing the code.  Let's
>>see if we can do better than this.  Let's summarize what you need and
>>devise a generalized solution for views.  Then we can have people here
>>work on it with you.  Otherwise you're going to have to fork or keep
>>patching over and over again.  I think this will be too much of a PITA :).
>Whatever it takes.
>I believe the description above is a fairly good example.
>Essentially, because there is no standard LDAP schema for email programs I 
>want to have one single all-encompassing schema to contain the data. Specific 
>views for each email program would be created as necessary. I'm not sure how 
>much more specific an example you would like, and since I'm still a newbie at 
>Eve it would be up to you to prod me further.
I understand and will help you out.  I'm just coming back from that 
crash and still have some cleanup to do before the holidays kick may 
arse.  Just bear with me a little and keep looking at the code and 
experimenting with it.  BTW there is much more to this picture than 
first meets the eye.  Really it looks simple but its not.

I'd like to recommend an approach but I myself do not know where you 
should go just yet.  I have some ideas too but I need to experiment 
myself.  Plus not that there will be some reorganization to this code 
here in 0.9 to refactor it and make it easier to write interceptor 
services.  I was hoping we can use your use case to drive the design of 
the view service in Eve.

>As it stands, I was hoping to add a LookupFilter to the LookupFilter 
>Interceptor; but as you saw from my code it does not look like this approach 
>will work because:
>A) This interceptor does not provide a mechanism for me to determine what the 
>baseDN is.
It has to or we have a bug.  One of the things you get is the DN.  There 
are three beasts here that may be useful.  BTW they are scattered in 
different places so hence the need for refactoring this.  These three 
mechanisms are:

- LookupFilters
- SearchResultFilters
- Interceptors

Using a combination of these three kinds of components is probably what 
will be needed.  I don't know what you are doing that is creating the 
problem or if there are bugs in Eve.  I'm having trouble discerning this 
because you have the weirdest structure and use of LDAP I have ever seen 
:-).  This is good btw.  However it makes me think we need more of a 
concerted approach.

I just think we need to be working with the same code and the same exact 
setup rig (directory tree and entries) in a branch where we can change 
Eve without impacting others.  I don't mind creating this branch.  Right 
at this moment focusing on this will just delay the release without 
really giving us results.  Poking around emails trying to guess what 
each of us is refering to will rob us of precious time which we could be 
using for other things. 

>B) This interceptor does not provide a mechanism for me to dynamically rewrite 
>the search request.
The interceptor framework was designed to let you do what ever you want 
but its not easy.  There are interactions to worry about and you need to 
know the code well. I need to think about whether or not I've used the 
right concepts here too.  This is highly experimental stuff you are 
looking at and the first time its been setup to work.

>Perhaps if I had a "Before" Interceptor that I could guarantee would come 
>early enough in the chain (I don't know what position constraints would be 
>atm - I'm only guessing that it may matter) that could modify the incoming 
>search request.
Perhaps we may need to do this as well.  There are interceptor based 
services that use the three approaches above: LookupFilters + 
SearchResultFilters + Actual Interceptor. Question is do we have the 
right mix to solve your problem properly or are there going to be some 
changes needed to Eve's architecture to accomodate that.

>I could delve deeper in the the Context implementation to see if the 
>LookupFilter approach actually does have merit, and I could write a test 
>interceptor and stack hacking in that direction too. But it would be nicer if 
>someone with knowledge about the Eve internals could say "do it this way".
No Context is not what you need.  For some reason something is a muck 
and you're not getting the DN.  I can't figure this out at the moment.


View raw message