Skip to content

LDAP authentication should try to reconnect instead of comparing passwords #17682

@Seb33300

Description

@Seb33300

How LDAP authentication actually works in Symfony 2.8 (with the new LDAP component):

  1. LDAP connection with an "admin" account
  2. Check if the username trying to connect exists and get user data
  3. If yes, check if password is equal to the "userpassword" of the user previously get
  4. If passwords match, it's OK!

How LDAP authentication should work:

  1. LDAP connection with an "admin" account
  2. Check if the username trying to connect exists
  3. If yes, try to connect to LDAP with user credentials.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions