Skip to content

Add explicit OpenLDAP password changes with Argon2 support - #809

Draft
stevebauman wants to merge 1 commit into
masterfrom
refactor/explicit-password-changes
Draft

Add explicit OpenLDAP password changes with Argon2 support#809
stevebauman wants to merge 1 commit into
masterfrom
refactor/explicit-password-changes

Conversation

@stevebauman

Copy link
Copy Markdown
Member

Summary

This adds Argon2 password support for OpenLDAP and exposes password changes as an explicit model operation:

$user->changePassword('current-password', 'new-password');
  • Add Argon2i and Argon2id hashing using OpenLDAP's {ARGON2} scheme.
  • Add support for the RFC 3062 Password Modify extended operation.
  • Add OpenLDAP\User::changePassword() for immediate self-service password changes.
  • Continue supporting administrative password resets through attribute assignment and save().
  • Reject Argon2 changes through $user->password = [$old, $new] with guidance to use changePassword().

Why

The existing password-change flow removes the old stored hash and adds a newly generated hash. Argon2 hashes use a random salt, so the client cannot reproduce the stored value needed for that removal.

Using the directory's Password Modify extended operation lets the server verify the current password and apply its configured hashing and password policies. Keeping this operation separate from save() also avoids retaining plaintext credentials on the model or combining non-atomic LDAP operations under one model save.

Validation

  • 702 unit tests
  • 1,837 assertions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant