Issue Type: Bug Bug
Affects Versions: PLINK_2.5.0.Final
Assignee: Anil Saldhana
Components: IDM
Created: 03/Sep/13 5:30 PM
Description:

Actually salt generation in PasswordCredentialEncoder is not secure and is unusable as it always generate same value for salt. It's because PasswordCredentialEncoder is always returning new instance of SecureRandom with static value of seed, which means that it always return same salt with value 8045985940433151156 (my platform is Sun JDK6, Ubuntu 12.10)

See this example application (During testing, I've temporarily added this piece of code directly to class PasswordCredentialHandler):

    public static void main(String[] args) {
        PasswordCredentialHandler passwordCredHandler = new PasswordCredentialHandler();
        for (int i=0 ; i<3 ; i++) {
            String salt = passwordCredHandler.generateSalt();
            System.out.println("Generated" + i + ": " + salt);
        }
    }

The output of the application will be:

Generated0: 8045985940433151156
Generated1: 8045985940433151156
Generated2: 8045985940433151156
Fix Versions: PLINK_2.5.1.Final
Project: PicketLink
Priority: Critical Critical
Reporter: Marek Posolda
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira