You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Gianmaria Clerici <gc...@bridgestream.com> on 2005/05/25 00:15:08 UTC

custom authenticator and custom partition

I just started to work on a custom partition and I also wrote a custom
authenticator.

 

I have few questions:

 

-          When the AuthenticationService.process() loops through the
configured authenticator, it will try the SimpleAuthenticator first by
default. Is there any way to disable this and just loops over the
configured authenticator (see server.authenticators properties)?

 

-          In SimpleAuthenticator.authenticate(), if the user DN is not
found it will throw an LdapNameNotFoundException exception. But this is
preventing the AuthenticationService.process() 
to call the next authenticator. 
I think it should just throw an LdapAuthenticationException exception.
What do you all think?

 

-          In the method authenticate() of my custom authenticator, I
created an LdapPrincipal and returned it. I also created a connection to
my own database, based on the 
principal that we are trying to authenticate, and added that to the
ServerContext. 
Later on in my custom partition code, I want to be able to retrieve both
the LdapPrincipal and the connection to my own database.
It looks like only the method search() has an input parameter (Map env)
with the environment associated with the ServerContext. 
But I want to be able to retrieve this environment also from other
methods (like modify, add and delete). 
Is that possible?

 

Thanks a lot