-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
How LDAP authentication actually works in Symfony 2.8 (with the new LDAP component):
- LDAP connection with an "admin" account
- Check if the username trying to connect exists and get user data
- If yes, check if password is equal to the "userpassword" of the user previously get
- If passwords match, it's OK!
How LDAP authentication should work:
- LDAP connection with an "admin" account
- Check if the username trying to connect exists
- If yes, try to connect to LDAP with user credentials.
- If connection works, it's OK!
The "admin" account may not always have access to the "userpassword" field.
This is the problem I am encountering.
Problem is here:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
loadUser()
method should not assign the $user['userpassword']
but should try to reconnect with entered password then assign entered password if connection works.
See:
http://stackoverflow.com/a/6703425/1489264
http://stackoverflow.com/questions/25519666/is-ldap-binding-account-required-for-user-authenticai
dnagirl