processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.07k stars 1.51k forks source link

mod_shared_roster_ldap doesn't work #4165

Open emoxam opened 7 months ago

emoxam commented 7 months ago

Hello!

Environment

Configuration (only if needed): grep -Ev '^$|^\s*#' ejabberd.yml

  mod_shared_roster_ldap:
    ldap_base: "ou=people,dc=example,dc=com"
    ldap_servers: [172.16.10.86]
    ldap_port: 389
    ldap_rootdn: "cn=username,dc=example,dc=com"
    ldap_password: "password"
    ldap_filter: "(objectClass=*)"
...

Errors from error.log/crash.log

No errors

Bug description

If i understand correctly i should see all my ldap users at the roster. But no users from LDAP is there. Thats what i see at the ldap server logs when ejabberd starts

Feb 23 16:16:43 ldap-mail slapd[48147]: conn=1018 fd=12 ACCEPT from IP=172.16.10.202:58480 (IP=0.0.0.0:389)
Feb 23 16:16:43 ldap-mail slapd[48147]: conn=1018 op=0 BIND dn="cn=username,dc=example,dc=com" method=128
Feb 23 16:16:43 ldap-mail slapd[48147]: conn=1018 op=0 BIND dn="cn=username,dc=example,dc=com" mech=SIMPLE ssf=0
Feb 23 16:16:43 ldap-mail slapd[48147]: conn=1018 op=0 RESULT tag=97 err=0 text=

But thats what i see at the LDAP server log when i run ldapsearch -x -H ldap://172.16.10.86:389 -b "ou=people,dc=integris,dc=ru" -D "cn=username,dc=example,dc=com" -w "password" "(objectClass=*)"

Feb 23 16:19:06 ldap-mail slapd[48147]: conn=1019 fd=15 ACCEPT from IP=172.16.10.202:42710 (IP=0.0.0.0:389)
Feb 23 16:19:06 ldap-mail slapd[48147]: conn=1019 op=0 BIND dn="cn=username,dc=example,dc=com" method=128
Feb 23 16:19:06 ldap-mail slapd[48147]: conn=1019 op=0 BIND dn="cn=username,dc=example,dc=com" mech=SIMPLE ssf=0
Feb 23 16:19:06 ldap-mail slapd[48147]: conn=1019 op=0 RESULT tag=97 err=0 text=
Feb 23 16:19:06 ldap-mail slapd[48147]: conn=1019 op=1 SRCH base="ou=people,dc=example,dc=com" scope=2 deref=0 filter="(objectClass=*)"
Feb 23 16:19:06 ldap-mail slapd[48147]: conn=1019 op=1 SEARCH RESULT tag=101 err=0 nentries=16 text=
Feb 23 16:19:06 ldap-mail slapd[48147]: conn=1019 op=2 UNBIND
Feb 23 16:19:06 ldap-mail slapd[48147]: conn=1019 fd=15 closed

Why there is SRCH base at the log and no such strings when i start ejabberd ?

Thanks

Neustradamus commented 7 months ago

To follow this ticket