Hey Niklas,

As you have said,  encryption should probably be called from the
UserManager. That's why I extended DBUserManager in order to perform
encryption in the Incubator version of FTPServer.
I could use that same user manager  in this version but I found that I could
not take advantage of the XSD definition of <db-user-manger> (what about
using getBeanClassName() rather than getBeanClass() in the
BeanDefinitionParsers() and adding an optional "class" attribute in the
elements where it makes sense? )
and then I thought, hey it would be cool that the UserManager delegated
password encryption to an external bean configured via Spring ...  this way
It would be possible to plug in any  'password-processing' mechanism into
any User Manager without a need to change the User Manager itself.

Although the option of  calling an "encryptPassword" function inside the
UserManager should be enough, I think I've seen the bean implementing a
method approach quite often (eg, i think there is such a method to verify a
digital certificate in JBOSS).




2008/8/18 Niklas Gustavsson <[EMAIL PROTECTED]>

> On Mon, Aug 18, 2008 at 3:41 PM, David Latorre <[EMAIL PROTECTED]> wrote:
> > Regarding current FTPLet behaviour, it seems that the "init(FtpletContext
> > context)" method is not getting called anymore in M2 (or at least latest
> SVN
> > version). Is this the expected behaviour? If it is, is there any other
> way
> > to access FtpletContext ? My onLogin() method  was calling
> > "DbUserManager.save()" to save the login time for the user, if I cannot
> do
> > this anymore do you have any suggestions?
>
> I've added a JIRA issue for this and commited a fix, could you please
> verify that it works for you?
> https://issues.apache.org/jira/browse/FTPSERVER-163
>
> > By the way  , I would like to suggest that UserManagers or "PASS" tried
> to
> > call an external function (implemented through an interface?) to process
> the
> > password before the actual login ( so I can encrypt the password without
> > overriding the PASS command).
>
> I would say that this is what a custom user manager is for. You can
> try to convince me otherwise but I'll need to understand your use case
> a bit better.
>
> /niklas
>

Reply via email to