Je tentais toute la journée pour savoir ou google, comment ajouter salt
à mon mot de passe hashed lors de l'authentification via Spring 3 security
et faire tout cela pour travailler ensemble. Sans sel ça marche très bien.Salut un mot de passe avec le printemps 3 sécurité
<!-- authentication from database -->
<security:authentication-manager>
<security:authentication-provider>
<security:password-encoder hash='md5'/>
<security:jdbc-user-service
data-source-ref='dataSource'
users-by-username-query="
select username,password, salt
from users where username=?"
authorities-by-username-query="
select u.username, ur.authority from users u, user_roles ur
where u.user_id = ur.user_id and u.username =? " />
</security:authentication-provider>
</security:authentication-manager>
Et si je voudrais créer pasword salé, il est fait juste par user.setPassword(md5(somePassword+someSalt));
Merci pour tout conseil.