I'm just learning about LDAP, and there's something I don't quite understand.
When we create users in a directory, we define their password using the userPassword
. When we use for example the {SSHA}
scheme, as far as I understand, it works like this: We take the cleartext password, add to it some random salt, and hash it all together. We then store this value in the userPassword
attribute.
Now, say I have some application that needs to authenticate a user using this directory. The application prompts the user to enter Username and Password. Now, the application queries the directory to search for the relevant user entry.
Then, the application needs to compare the password that the user entered with the userPassword
attribute. But this is what I don't understand - how does the application know the random salt that was generated when the user was first registered to the directory?