You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Robin Helgelin <lo...@gmail.com> on 2008/02/02 11:21:05 UTC
Re: T5 tapestry5-acegi salt source not overridable
On Jan 21, 2008 7:59 PM, Franz Amador <fg...@yahoo.com> wrote:
> It looks to me like the tapestry5-acegi module hard-codes the password salt source to be SystemWideSaltSource. I can change the system-wide salt via acegi.password.salt, but there is no corresponding acegi.salt.source property. Having a system-wide salt is better than having no salt, but it isn't as strong as having a different salt for each user. Is there a way I can put in a request for supporting a new acegi.salt.source config property? I didn't see a mailing list or issue tracker on the tapestry5-acegi site (http://www.localhost.nu/java/tapestry5-acegi/). Is here an okay place to discuss this?
Hi again.
I was looking at this today, and can't you just override the service
by contributing an alias? Seems to work for me.
This is from my test application AppModule.java where SaltSourceImpl
is a quick class that simply extends SystemWideSaltSource.
public static void bind(ServiceBinder binder) {
binder.bind(SaltSource.class,
SaltSourceImpl.class).withId("MySaltSource");
}
public static SaltSource buildMySaltSource() throws Exception {
SaltSourceImpl saltSource = new SaltSourceImpl();
saltSource.setSystemWideSalt("DEADBEEF");
saltSource.afterPropertiesSet();
return saltSource;
}
public static void contributeAlias(@InjectService("MySaltSource")
SaltSource saltSource,
Configuration<AliasContribution> configuration) {
configuration.add(AliasContribution.create(SaltSource.class,
saltSource));
}
Can you test and verify and I'll update the documentation.
--
regards,
Robin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org