kamax-matrix / mxisd

Federated Matrix Identity Server
GNU Affero General Public License v3.0
220 stars 112 forks source link

cannot make it work with my ldap's organization #78

Closed fatjoni closed 6 years ago

fatjoni commented 6 years ago

What i want to achieve is use the LDAP authentication for seamless authentication of users in the format name.surname or name.surname@gov.local. I set up mxisd.yml like another working configuration i have been using with gitlab. I installed rest auth module too. The problem is that even though i have been reading for a week back and forth in your github, i cannot find the proper configurations to make it work. Can you provide me a step by step solution for this scenario? Also, in the gitlab i have to login through @gov.local, in the current confgiuration of matrix only if i enter name.surname the request is forwarded to the mxisd docker, if i use @ it tries to authenticate against the synapse instance.

Thank you in advance!

maxidorius commented 6 years ago

Just to be sure, did you follow the following documents in this order:

fatjoni commented 6 years ago

Thank you for the support, i managed to go up to the point where mxisd tries to lookup user to ldap but fails due to a network problem: logs:

11 06:27:11.357  INFO [nio-8090-exec-3]   i.k.m.b.ldap.LdapThreePidProvider : Performing LDAP lookup user@gov.local of type email
11 06:27:11.403  WARN [ NioProcessor-2]   o.a.d.l.c.a.LdapNetworkConnection : Connection reset by peer

i have setup everything through docker, the synapse and the mxisd, i can telnet my AD at port 389 from host and from synapse container, i cannot telnet anything at all from the mxisd even though there are part of the same network. Any clues?

maxidorius commented 6 years ago

Which docker image version of mxisd are you using?

fatjoni commented 6 years ago

The very last version. I recreated it today for the last time by getting latest tagged version.

maxidorius commented 6 years ago

You said you can't telnet from the mxisd container - could you show me the exact command and the output you're getting?

fatjoni commented 6 years ago

mxisd synapse The above images are screenshots of the commands and outputs. I am trying to telnet google just to make sure that telnet even works. From synapse server i cannot ping but i can telnet LDAP at 389. Thank you for your support!

maxidorius commented 6 years ago

in this case, telnet won't be of any use and is not good diagnostic at all. But the behavior is consistent, in both containers you get Connection closed by foreign host.

If you want to properly test LDAP connectivity, you can't use telnet. It would help at this point if you could show me the full log output of the mxisd container, including the query which is made and failling. Ideally, restart the container to get a clean log.

You can send the log output to my github email or on Matrix in a private message (I'm under Maximus in the mxisd room)

maxidorius commented 6 years ago

The issue was that TLS was enabled but a non-TLS port was configured (389).