tykeal / ep_ldapauth

(Up for adoption) LDAP authentication plugin for Etherpad-lite
GNU General Public License v2.0
25 stars 20 forks source link

Username not set after successful LDAP auth #44

Closed nblock closed 3 years ago

nblock commented 4 years ago

I'm using Etherpad Lite 1.8.4 with ep_ldapauth 0.3.0. Authentication via LDAP works but the username is not set after successful authentication.

The user attributes are retrieved from LDAP and stored in a session:

ueberDB - SET    - sessionstorage:2YKbRLzw-eXNxTOnmnY61KIE9EKs4dNM - {"cookie":{"path":"/","_expires":null,"originalMaxAge":null,"httpOnly":true,"secure":false},"user":{"
username":"me","displayName":"Me Me Me","userDN":"uid=me,ou=people,dc=example,dc=com"}} - to buffer

Relevant parts from settings.json

  requireAuthentication": true,

  "users": {
    "ldapauth": {
      "password": "dummy_password",
      "url": "ldaps://ldap.example.com",
      "accountBase": "ou=people,dc=example,dc=com",
      "accountPattern": "(&(objectClass=*)(uid={{username}}))",
      "displayNameAttribute": "cn",
      "searchDN": "cn=mybinduser,dc=example,dc=com",
      "searchPWD": "mybindpassword",
      "groupSearchBase": "ou=group,dc=example,dc=com",
      "groupAttribute": "member",
      "groupAttributeIsDN": true,
      "searchScope": "sub",
      "groupSearch": "(&(cn=admin)(objectClass=groupOfNames))",
      "anonymousReadonly": false
    }
  },

Do I miss something obvious here?

pcworld commented 3 years ago

Has been fixed by #45. ep_ldapauth still needs a new npm release, though.

tykeal commented 3 years ago

@pcworld published v0.4.0