Implement PBKDF2-HMAC-SHA256 and PBKDF-HMAC-SHA512 password encoding schemes #228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the PBKDF2-HMAC-SHA256 and the PBKDF-HMAC-SHA512 password encoding schemes. They are essentially identical to the existing PBKDF2 encoding scheme, except that the latter uses the SHA1 hashing function, while the former use SHA256/SHA512.
Thanks to this similarity, it is possible to generalize most of the code into an abstract class and the only change required is to choose the hashing algorithm + some minor refactoring.
Preencoded values for testing:
testing
->
{PBKDF2-HMAC-SHA256}15000:lShdzU33covbDNiqGVDffdHh/86VaECJlaaNXchT0exQanVuMVRNR0VRbk0=
During testing it can be useful to tweak the default password policy to allow preencoded passwords with the following command:
./bin/dsconfig -p 4444 -h localhost -D "cn=Directory Manager" -w <password> set-password-policy-prop --policy-name "Default Password Policy" --set allow-pre-encoded-passwords:true -Xn
This PR also adds the corresponding server attributes documentation.