I checked this forum and the docs, but did not find the answer to this question, that is, how can I make the basic Spring security configuration using the basic Java object as MD5 encoding salt?
Here is my Spring Security Context Context Configuration:
<beans:bean id="saltSource" class="com.myproject.sec.util.MyString" scope="singleton" >
<beans:constructor-arg value="12345" />
</beans:bean>
<authentication-manager alias="authenticationManager">
<authentication-provider user-service-ref="userService">
<password-encoder hash="md5">
<salt-source ref="saltSource" />
</password-encoder>
</authentication-provider>
</authentication-manager>
... but this configuration throws an unwanted Exception error, complaining that the Salt source is not connected to the org.springframework.security.authentication.dao.SaltSource interface, but I do not want to use the User details as my salt property (as this interface supports user data), but rather my custom String object, as shown above. How do I achieve this?
, , , , :
<authentication-manager alias="authenticationManager">
<authentication-provider user-service-ref="userService">
<password-encoder hash="md5">
<salt-source user-property="username"/>
</password-encoder>
</authentication-provider>
</authentication-manager>
, "12345" :
<authentication-manager alias="authenticationManager">
<authentication-provider user-service-ref="userService">
<password-encoder hash="md5">
<salt-source system-wide="12345"/>
</password-encoder>
</authentication-provider>
</authentication-manager>
... , "12345", , fred, , Salt "fred12345", ?