Closed procopsamuraev closed 5 years ago
So this is the actual error line in mxisd log:
[XNIO-1 task-9] ERROR io.kamax.mxisd.http.undertow.handler.SaneHandler - Transaction #1554870624663 - ERR_04202 A value is missing on some RDN
This is a LDAP error, and the specifics are:
ERR_04202 A value is missing on some RDN
I don't know what it means tho, but the issue is not with mxisd itself. Either the config you have given, or a specific configuration in your LDAP/AD.
Somehow change db to postgress solve the problem.
I have the same issue:
[XNIO-1 task-2] INFO io.kamax.mxisd.backend.ldap.LdapAuthProvider - Performing auth for @mjattiot:opensense.spaces.dev.opensense.io
[XNIO-1 task-2] ERROR io.kamax.mxisd.http.undertow.handler.SaneHandler - Reference #1555421546384 - ERR_04202 A value is missing on some RDN
[XNIO-1 task-2] INFO io.kamax.mxisd.http.undertow.handler.BasicHttpHandler - Request POST http://matrix-identity:8090/_matrix-internal/identity/v1/check_credentials - Error M_UNKNOWN: An internal server error occured. If this error persists, please contact support with reference #1555421546384
I am using Google LDAP. My configuration is pretty simple:
ldap:
enabled: true
connection:
host: 'ldap-proxy.core'
port: 389
bindDn: 'A_USER'
bindPassword: 'A_PASSWORD'
baseDNs: [ 'ou=Users,dc=opensense,dc=fr' ]
attribute:
uid:
type: 'uid'
value: 'uid'
name: 'cn'
threepid:
email:
- 'mail'
Any clue ? Could you point me to the code line where the LDAP request is handle ?
This is a configuration mismatch basically, some attributes are not properly set (Not possible to tell on config alone), and what you should look into is what is the cause of the following error on Google LDAP:
ERR_04202 A value is missing on some RDN
The code handling the login in LDAP is here. If we can figure out what the error actually means in your LDAP, I can fix on my end if there is something to fix.
This is the first time we come across this error and I have no means to replicate, so we'll need to work together on this one.
Thanks for your quick answer. How can I easily activate the debug mode in mxisd ? Can I add to the configuration file something like:
io.kamax.mxisd=debug
??
How did you install mxisd?
I am using the Dockerfile
It seems like we didn't give a mean to change the logging level for the Docker image, which is very annoying... I can fix but not before tomorrow at earliest.
It would be very keen from you !!
I found the issue. According to Google LDAP the bindDn should be in the form "my_user_name" without the "cn="
ldapsearch -H ldap://localhost:1234 -D 'myuser' -w mypassword -b "dc=opensense,dc=fr"
and it works with ldapsearch but throw ERR_04202 with mxisd.
I found out that the ldap client used by mxisd (LdapConnection.bind) currently only allows valid DN as name. So I requested Google LDAP by adding cn= in the bindDn, even if I am not respecting their official documentation and it worked both on ldapsearch and mxisd !!
ldapsearch -H ldap://localhost:1234 -D 'cn=myuser' -w mypassword -b "dc=opensense,dc=fr"
@mjattiot That's awesome news! Thank you for researching this. Could you show your new mxisd config just to be clear on what works, to have a reference item for anyone hit by this in the future?
Sure, here is my config file:
ldap:
enabled: true
connection:
host: 'GOOGLE_LDAP_PROXY'
port: 389
tls: false
bindDn: 'cn=USER_GENERATED_BY_GOOGLE_LDAP'
bindPassword: 'PASSWORD_GENERATED_BY_GOOGLE_LDAP'
baseDNs:
- 'ou=Users,dc=opensense,dc=fr'
attribute:
uid:
type: 'uid'
value: 'uid'
name: 'cn'
threepid:
email:
- 'mail'
The bindDn should start with "cn=" even if stated otherwise by Google's documentation.
Please also note that because mxisd can't authenticate through a certificate, I setup a ldap proxy that initiate a TLS connection with a certificate to ldaps://ldap.google.com
Thank you for the follow up. Will close this now.
Cant make work ldap+synapse+mxisd on local setup.
Installed synapse from pip version 0.99.3 on ubuntu server 18.04.2 manage to make work AD auth with config :
trying make ldap auth with mxisd installed mxisd from source version3.3.8.Final configure synapse: homeserver.yaml and installed rest auth.
mxisd.yaml
Logs: