You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Jacques Oosthuizen <ja...@conor.co.za> on 2009/11/27 14:12:15 UTC

PARITION AGAIN

Still not having luck , even if I remove the default authenticator

  List<Interceptor> interceptors = directoryService.getInterceptors();
        Iterator<Interceptor> iter = interceptors.iterator();
        while (iter.hasNext()) {
             Interceptor next = iter.next();
             
             if (next instanceof
org.apache.directory.server.core.authn.AuthenticationInterceptor)
             {
                 
                 interceptors.remove(next);
                 break;
             }
      
        }

But my bind in my partition still does not get called . Any help will be
appreciated

Jacques Oosthuizen
Conor Information Technologies
Director
mobile :  0827699138
web : http://www.conor.co.za
mail : jacqueso@conor.co.za






Re: PARITION AGAIN

Posted by Ersin ER <er...@gmail.com>.
If what you want to intercept is only the bind method you can just write
your own Authentication Interceptor or even you may just write your own
Authentication Method and integrate it into the existing Authentication
Interceptor.

Writing a partition makes sense when you want to control data storage as
well as taking advantage of the implemented services (as interceptors) such
as Access Control.

HTH,

On Mon, Nov 30, 2009 at 06:05, Jacques Oosthuizen <ja...@conor.co.za>wrote:

> I had a look at the interceptors, do you thing it will be better to write
> my
> own interceptor and not a partition ?
>
>
> On 2009/11/29 11:57 PM, "Ersin ER" <er...@gmail.com> wrote:
>
> > Well, the ultimate solution is to browse ApacheDS code in Eclipse and
> open
> > the type hierarchy for Interceptor interface. For all the classes in the
> > chain you need to check whether it overrides the bind method.
> >
> > A more advanced solution is to use AspectJ and analyzing all bind methods
> on
> > the fly.
> >
> > (I am currently unable to work on the code because I am not using my own
> > machine but in fact solving the problem is quite easy.)
> >
> > On Sun, Nov 29, 2009 at 17:54, Jacques Oosthuizen <jacqueso@conor.co.za
> >wrote:
> >
> >> Thanks for the help , I have removed the Autheniticator but my bind
> method
> >> still does not get called. I do see in the logs a lookup happening in
> the
> >> BindHandler and that it is failing because by dn for auth is not found.
> It
> >> is not calling my lookup in my partition. I am thinking of implementing
> my
> >> own BindHandler to handle this but that seems like too much work .
> >>
> >> On 2009/11/28 10:11 PM, "Ersin ER" <er...@gmail.com> wrote:
> >>
> >>> The interceptor's name should be AuthenticationInterceptor or
> >>> authenticationInterceptor.
> >>>
> >>> (You may just iterate over the interceptors and print their names.)
> >>>
> >>> On Sat, Nov 28, 2009 at 19:24, Jacques Oosthuizen <
> jacqueso@conor.co.za
> >>> wrote:
> >>>
> >>>> I still have tried to remove the interceptor like
> >>>>
> >>>>
> >>>>
> >>>>
> >>
> directoryService.getInterceptorChain().remove("org.apache.directory.server.c
> >>>> ore.authn.AuthenticationInterceptor");
> >>>>
> >>>> I have also tried removing from actual list but if I print the list
> the
> >>>> interceptor is still there.
> >>>>
> >>>>
> >>>>
> >>>> On 2009/11/27 11:35 PM, "Ersin ER" <er...@gmail.com> wrote:
> >>>>
> >>>>> You need to call getInterceptorChain() if you really want to work on
> >> the
> >>>>> chain. getInterceptors() just returns a clone of it. And removing the
> >>>>> default Authn interceptor should really help, because it obviously
> >>>> prevents
> >>>>> the bind call being forwarded in the chain. (I just checked the
> code.)
> >>>>>
> >>>>> HTH,
> >>>>>
> >>>>> On Fri, Nov 27, 2009 at 15:12, Jacques Oosthuizen <
> >> jacqueso@conor.co.za
> >>>>> wrote:
> >>>>>
> >>>>>> Still not having luck , even if I remove the default authenticator
> >>>>>>
> >>>>>>  List<Interceptor> interceptors =
> directoryService.getInterceptors();
> >>>>>>        Iterator<Interceptor> iter = interceptors.iterator();
> >>>>>>        while (iter.hasNext()) {
> >>>>>>             Interceptor next = iter.next();
> >>>>>>
> >>>>>>             if (next instanceof
> >>>>>> org.apache.directory.server.core.authn.AuthenticationInterceptor)
> >>>>>>             {
> >>>>>>
> >>>>>>                 interceptors.remove(next);
> >>>>>>                 break;
> >>>>>>             }
> >>>>>>
> >>>>>>        }
> >>>>>>
> >>>>>> But my bind in my partition still does not get called . Any help
> will
> >> be
> >>>>>> appreciated
> >>>>>>
> >>>>>> Jacques Oosthuizen
> >>>>>> Conor Information Technologies
> >>>>>> Director
> >>>>>> mobile :  0827699138
> >>>>>> web : http://www.conor.co.za
> >>>>>> mail : jacqueso@conor.co.za
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>> Jacques Oosthuizen
> >>>> Conor Information Technologies
> >>>> Director
> >>>> mobile :  0827699138
> >>>> web : http://www.conor.co.za
> >>>> mail : jacqueso@conor.co.za
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>
> >> Jacques Oosthuizen
> >> Conor Information Technologies
> >> Director
> >> mobile :  0827699138
> >> web : http://www.conor.co.za
> >> mail : jacqueso@conor.co.za
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
>
> Jacques Oosthuizen
> Conor Information Technologies
> Director
> mobile :  0827699138
> web : http://www.conor.co.za
> mail : jacqueso@conor.co.za
>
>
>
>
>
>
>


-- 
Ersin ER
http://www.ersiner.net

Re: PARITION AGAIN

Posted by Jacques Oosthuizen <ja...@conor.co.za>.
I had a look at the interceptors, do you thing it will be better to write my
own interceptor and not a partition ?


On 2009/11/29 11:57 PM, "Ersin ER" <er...@gmail.com> wrote:

> Well, the ultimate solution is to browse ApacheDS code in Eclipse and open
> the type hierarchy for Interceptor interface. For all the classes in the
> chain you need to check whether it overrides the bind method.
> 
> A more advanced solution is to use AspectJ and analyzing all bind methods on
> the fly.
> 
> (I am currently unable to work on the code because I am not using my own
> machine but in fact solving the problem is quite easy.)
> 
> On Sun, Nov 29, 2009 at 17:54, Jacques Oosthuizen <ja...@conor.co.za>wrote:
> 
>> Thanks for the help , I have removed the Autheniticator but my bind method
>> still does not get called. I do see in the logs a lookup happening in the
>> BindHandler and that it is failing because by dn for auth is not found. It
>> is not calling my lookup in my partition. I am thinking of implementing my
>> own BindHandler to handle this but that seems like too much work .
>> 
>> On 2009/11/28 10:11 PM, "Ersin ER" <er...@gmail.com> wrote:
>> 
>>> The interceptor's name should be AuthenticationInterceptor or
>>> authenticationInterceptor.
>>> 
>>> (You may just iterate over the interceptors and print their names.)
>>> 
>>> On Sat, Nov 28, 2009 at 19:24, Jacques Oosthuizen <jacqueso@conor.co.za
>>> wrote:
>>> 
>>>> I still have tried to remove the interceptor like
>>>> 
>>>> 
>>>> 
>>>> 
>> directoryService.getInterceptorChain().remove("org.apache.directory.server.c
>>>> ore.authn.AuthenticationInterceptor");
>>>> 
>>>> I have also tried removing from actual list but if I print the list the
>>>> interceptor is still there.
>>>> 
>>>> 
>>>> 
>>>> On 2009/11/27 11:35 PM, "Ersin ER" <er...@gmail.com> wrote:
>>>> 
>>>>> You need to call getInterceptorChain() if you really want to work on
>> the
>>>>> chain. getInterceptors() just returns a clone of it. And removing the
>>>>> default Authn interceptor should really help, because it obviously
>>>> prevents
>>>>> the bind call being forwarded in the chain. (I just checked the code.)
>>>>> 
>>>>> HTH,
>>>>> 
>>>>> On Fri, Nov 27, 2009 at 15:12, Jacques Oosthuizen <
>> jacqueso@conor.co.za
>>>>> wrote:
>>>>> 
>>>>>> Still not having luck , even if I remove the default authenticator
>>>>>> 
>>>>>>  List<Interceptor> interceptors = directoryService.getInterceptors();
>>>>>>        Iterator<Interceptor> iter = interceptors.iterator();
>>>>>>        while (iter.hasNext()) {
>>>>>>             Interceptor next = iter.next();
>>>>>> 
>>>>>>             if (next instanceof
>>>>>> org.apache.directory.server.core.authn.AuthenticationInterceptor)
>>>>>>             {
>>>>>> 
>>>>>>                 interceptors.remove(next);
>>>>>>                 break;
>>>>>>             }
>>>>>> 
>>>>>>        }
>>>>>> 
>>>>>> But my bind in my partition still does not get called . Any help will
>> be
>>>>>> appreciated
>>>>>> 
>>>>>> Jacques Oosthuizen
>>>>>> Conor Information Technologies
>>>>>> Director
>>>>>> mobile :  0827699138
>>>>>> web : http://www.conor.co.za
>>>>>> mail : jacqueso@conor.co.za
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>>> Jacques Oosthuizen
>>>> Conor Information Technologies
>>>> Director
>>>> mobile :  0827699138
>>>> web : http://www.conor.co.za
>>>> mail : jacqueso@conor.co.za
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> Jacques Oosthuizen
>> Conor Information Technologies
>> Director
>> mobile :  0827699138
>> web : http://www.conor.co.za
>> mail : jacqueso@conor.co.za
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 

Jacques Oosthuizen
Conor Information Technologies
Director
mobile :  0827699138
web : http://www.conor.co.za
mail : jacqueso@conor.co.za







Re: PARITION AGAIN

Posted by Ersin ER <er...@gmail.com>.
Well, the ultimate solution is to browse ApacheDS code in Eclipse and open
the type hierarchy for Interceptor interface. For all the classes in the
chain you need to check whether it overrides the bind method.

A more advanced solution is to use AspectJ and analyzing all bind methods on
the fly.

(I am currently unable to work on the code because I am not using my own
machine but in fact solving the problem is quite easy.)

On Sun, Nov 29, 2009 at 17:54, Jacques Oosthuizen <ja...@conor.co.za>wrote:

> Thanks for the help , I have removed the Autheniticator but my bind method
> still does not get called. I do see in the logs a lookup happening in the
> BindHandler and that it is failing because by dn for auth is not found. It
> is not calling my lookup in my partition. I am thinking of implementing my
> own BindHandler to handle this but that seems like too much work .
>
> On 2009/11/28 10:11 PM, "Ersin ER" <er...@gmail.com> wrote:
>
> > The interceptor's name should be AuthenticationInterceptor or
> > authenticationInterceptor.
> >
> > (You may just iterate over the interceptors and print their names.)
> >
> > On Sat, Nov 28, 2009 at 19:24, Jacques Oosthuizen <jacqueso@conor.co.za
> >wrote:
> >
> >> I still have tried to remove the interceptor like
> >>
> >>
> >>
> >>
> directoryService.getInterceptorChain().remove("org.apache.directory.server.c
> >> ore.authn.AuthenticationInterceptor");
> >>
> >> I have also tried removing from actual list but if I print the list the
> >> interceptor is still there.
> >>
> >>
> >>
> >> On 2009/11/27 11:35 PM, "Ersin ER" <er...@gmail.com> wrote:
> >>
> >>> You need to call getInterceptorChain() if you really want to work on
> the
> >>> chain. getInterceptors() just returns a clone of it. And removing the
> >>> default Authn interceptor should really help, because it obviously
> >> prevents
> >>> the bind call being forwarded in the chain. (I just checked the code.)
> >>>
> >>> HTH,
> >>>
> >>> On Fri, Nov 27, 2009 at 15:12, Jacques Oosthuizen <
> jacqueso@conor.co.za
> >>> wrote:
> >>>
> >>>> Still not having luck , even if I remove the default authenticator
> >>>>
> >>>>  List<Interceptor> interceptors = directoryService.getInterceptors();
> >>>>        Iterator<Interceptor> iter = interceptors.iterator();
> >>>>        while (iter.hasNext()) {
> >>>>             Interceptor next = iter.next();
> >>>>
> >>>>             if (next instanceof
> >>>> org.apache.directory.server.core.authn.AuthenticationInterceptor)
> >>>>             {
> >>>>
> >>>>                 interceptors.remove(next);
> >>>>                 break;
> >>>>             }
> >>>>
> >>>>        }
> >>>>
> >>>> But my bind in my partition still does not get called . Any help will
> be
> >>>> appreciated
> >>>>
> >>>> Jacques Oosthuizen
> >>>> Conor Information Technologies
> >>>> Director
> >>>> mobile :  0827699138
> >>>> web : http://www.conor.co.za
> >>>> mail : jacqueso@conor.co.za
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>
> >> Jacques Oosthuizen
> >> Conor Information Technologies
> >> Director
> >> mobile :  0827699138
> >> web : http://www.conor.co.za
> >> mail : jacqueso@conor.co.za
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
>
> Jacques Oosthuizen
> Conor Information Technologies
> Director
> mobile :  0827699138
> web : http://www.conor.co.za
> mail : jacqueso@conor.co.za
>
>
>
>
>
>
>


-- 
Ersin ER
http://www.ersiner.net

Re: PARITION AGAIN

Posted by Jacques Oosthuizen <ja...@conor.co.za>.
Thanks for the help , I have removed the Autheniticator but my bind method
still does not get called. I do see in the logs a lookup happening in the
BindHandler and that it is failing because by dn for auth is not found. It
is not calling my lookup in my partition. I am thinking of implementing my
own BindHandler to handle this but that seems like too much work .

On 2009/11/28 10:11 PM, "Ersin ER" <er...@gmail.com> wrote:

> The interceptor's name should be AuthenticationInterceptor or
> authenticationInterceptor.
> 
> (You may just iterate over the interceptors and print their names.)
> 
> On Sat, Nov 28, 2009 at 19:24, Jacques Oosthuizen <ja...@conor.co.za>wrote:
> 
>> I still have tried to remove the interceptor like
>> 
>> 
>> 
>> directoryService.getInterceptorChain().remove("org.apache.directory.server.c
>> ore.authn.AuthenticationInterceptor");
>> 
>> I have also tried removing from actual list but if I print the list the
>> interceptor is still there.
>> 
>> 
>> 
>> On 2009/11/27 11:35 PM, "Ersin ER" <er...@gmail.com> wrote:
>> 
>>> You need to call getInterceptorChain() if you really want to work on the
>>> chain. getInterceptors() just returns a clone of it. And removing the
>>> default Authn interceptor should really help, because it obviously
>> prevents
>>> the bind call being forwarded in the chain. (I just checked the code.)
>>> 
>>> HTH,
>>> 
>>> On Fri, Nov 27, 2009 at 15:12, Jacques Oosthuizen <jacqueso@conor.co.za
>>> wrote:
>>> 
>>>> Still not having luck , even if I remove the default authenticator
>>>> 
>>>>  List<Interceptor> interceptors = directoryService.getInterceptors();
>>>>        Iterator<Interceptor> iter = interceptors.iterator();
>>>>        while (iter.hasNext()) {
>>>>             Interceptor next = iter.next();
>>>> 
>>>>             if (next instanceof
>>>> org.apache.directory.server.core.authn.AuthenticationInterceptor)
>>>>             {
>>>> 
>>>>                 interceptors.remove(next);
>>>>                 break;
>>>>             }
>>>> 
>>>>        }
>>>> 
>>>> But my bind in my partition still does not get called . Any help will be
>>>> appreciated
>>>> 
>>>> Jacques Oosthuizen
>>>> Conor Information Technologies
>>>> Director
>>>> mobile :  0827699138
>>>> web : http://www.conor.co.za
>>>> mail : jacqueso@conor.co.za
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> Jacques Oosthuizen
>> Conor Information Technologies
>> Director
>> mobile :  0827699138
>> web : http://www.conor.co.za
>> mail : jacqueso@conor.co.za
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 

Jacques Oosthuizen
Conor Information Technologies
Director
mobile :  0827699138
web : http://www.conor.co.za
mail : jacqueso@conor.co.za







Re: PARITION AGAIN

Posted by Ersin ER <er...@gmail.com>.
The interceptor's name should be AuthenticationInterceptor or
authenticationInterceptor.

(You may just iterate over the interceptors and print their names.)

On Sat, Nov 28, 2009 at 19:24, Jacques Oosthuizen <ja...@conor.co.za>wrote:

> I still have tried to remove the interceptor like
>
>
>
> directoryService.getInterceptorChain().remove("org.apache.directory.server.c
> ore.authn.AuthenticationInterceptor");
>
> I have also tried removing from actual list but if I print the list the
> interceptor is still there.
>
>
>
> On 2009/11/27 11:35 PM, "Ersin ER" <er...@gmail.com> wrote:
>
> > You need to call getInterceptorChain() if you really want to work on the
> > chain. getInterceptors() just returns a clone of it. And removing the
> > default Authn interceptor should really help, because it obviously
> prevents
> > the bind call being forwarded in the chain. (I just checked the code.)
> >
> > HTH,
> >
> > On Fri, Nov 27, 2009 at 15:12, Jacques Oosthuizen <jacqueso@conor.co.za
> >wrote:
> >
> >> Still not having luck , even if I remove the default authenticator
> >>
> >>  List<Interceptor> interceptors = directoryService.getInterceptors();
> >>        Iterator<Interceptor> iter = interceptors.iterator();
> >>        while (iter.hasNext()) {
> >>             Interceptor next = iter.next();
> >>
> >>             if (next instanceof
> >> org.apache.directory.server.core.authn.AuthenticationInterceptor)
> >>             {
> >>
> >>                 interceptors.remove(next);
> >>                 break;
> >>             }
> >>
> >>        }
> >>
> >> But my bind in my partition still does not get called . Any help will be
> >> appreciated
> >>
> >> Jacques Oosthuizen
> >> Conor Information Technologies
> >> Director
> >> mobile :  0827699138
> >> web : http://www.conor.co.za
> >> mail : jacqueso@conor.co.za
> >>
> >>
> >>
> >>
> >>
> >>
> >
>
> Jacques Oosthuizen
> Conor Information Technologies
> Director
> mobile :  0827699138
> web : http://www.conor.co.za
> mail : jacqueso@conor.co.za
>
>
>
>
>
>
>


-- 
Ersin ER
http://www.ersiner.net

Re: PARITION AGAIN

Posted by Jacques Oosthuizen <ja...@conor.co.za>.
Thanks I will try it

JJ Oosthuizen
0827699138

On 27 Nov 2009, at 11:35 PM, Ersin ER <er...@gmail.com> wrote:

> You need to call getInterceptorChain() if you really want to work on  
> the
> chain. getInterceptors() just returns a clone of it. And removing the
> default Authn interceptor should really help, because it obviously  
> prevents
> the bind call being forwarded in the chain. (I just checked the code.)
>
> HTH,
>
> On Fri, Nov 27, 2009 at 15:12, Jacques Oosthuizen <jacqueso@conor.co.za 
> >wrote:
>
>> Still not having luck , even if I remove the default authenticator
>>
>> List<Interceptor> interceptors = directoryService.getInterceptors();
>>       Iterator<Interceptor> iter = interceptors.iterator();
>>       while (iter.hasNext()) {
>>            Interceptor next = iter.next();
>>
>>            if (next instanceof
>> org.apache.directory.server.core.authn.AuthenticationInterceptor)
>>            {
>>
>>                interceptors.remove(next);
>>                break;
>>            }
>>
>>       }
>>
>> But my bind in my partition still does not get called . Any help  
>> will be
>> appreciated
>>
>> Jacques Oosthuizen
>> Conor Information Technologies
>> Director
>> mobile :  0827699138
>> web : http://www.conor.co.za
>> mail : jacqueso@conor.co.za
>>
>>
>>
>>
>>
>>
>
>
> -- 
> Ersin ER
> http://www.ersiner.net

Re: PARITION AGAIN

Posted by Jacques Oosthuizen <ja...@conor.co.za>.
I still have tried to remove the interceptor like

      
directoryService.getInterceptorChain().remove("org.apache.directory.server.c
ore.authn.AuthenticationInterceptor");

I have also tried removing from actual list but if I print the list the
interceptor is still there.



On 2009/11/27 11:35 PM, "Ersin ER" <er...@gmail.com> wrote:

> You need to call getInterceptorChain() if you really want to work on the
> chain. getInterceptors() just returns a clone of it. And removing the
> default Authn interceptor should really help, because it obviously prevents
> the bind call being forwarded in the chain. (I just checked the code.)
> 
> HTH,
> 
> On Fri, Nov 27, 2009 at 15:12, Jacques Oosthuizen <ja...@conor.co.za>wrote:
> 
>> Still not having luck , even if I remove the default authenticator
>> 
>>  List<Interceptor> interceptors = directoryService.getInterceptors();
>>        Iterator<Interceptor> iter = interceptors.iterator();
>>        while (iter.hasNext()) {
>>             Interceptor next = iter.next();
>> 
>>             if (next instanceof
>> org.apache.directory.server.core.authn.AuthenticationInterceptor)
>>             {
>> 
>>                 interceptors.remove(next);
>>                 break;
>>             }
>> 
>>        }
>> 
>> But my bind in my partition still does not get called . Any help will be
>> appreciated
>> 
>> Jacques Oosthuizen
>> Conor Information Technologies
>> Director
>> mobile :  0827699138
>> web : http://www.conor.co.za
>> mail : jacqueso@conor.co.za
>> 
>> 
>> 
>> 
>> 
>> 
> 

Jacques Oosthuizen
Conor Information Technologies
Director
mobile :  0827699138
web : http://www.conor.co.za
mail : jacqueso@conor.co.za







Re: PARITION AGAIN

Posted by Ersin ER <er...@gmail.com>.
You need to call getInterceptorChain() if you really want to work on the
chain. getInterceptors() just returns a clone of it. And removing the
default Authn interceptor should really help, because it obviously prevents
the bind call being forwarded in the chain. (I just checked the code.)

HTH,

On Fri, Nov 27, 2009 at 15:12, Jacques Oosthuizen <ja...@conor.co.za>wrote:

> Still not having luck , even if I remove the default authenticator
>
>  List<Interceptor> interceptors = directoryService.getInterceptors();
>        Iterator<Interceptor> iter = interceptors.iterator();
>        while (iter.hasNext()) {
>             Interceptor next = iter.next();
>
>             if (next instanceof
> org.apache.directory.server.core.authn.AuthenticationInterceptor)
>             {
>
>                 interceptors.remove(next);
>                 break;
>             }
>
>        }
>
> But my bind in my partition still does not get called . Any help will be
> appreciated
>
> Jacques Oosthuizen
> Conor Information Technologies
> Director
> mobile :  0827699138
> web : http://www.conor.co.za
> mail : jacqueso@conor.co.za
>
>
>
>
>
>


-- 
Ersin ER
http://www.ersiner.net