kamax-matrix / mxisd

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

User Directory search Sending Invites #55

Closed nanohayder closed 6 years ago

nanohayder commented 6 years ago

Hi,

first thanks for this great job it's helping us a lot.

we have a problem that when we use the User Directory (LDAP Backend) if we opened an invite with a user that doesn't have Riot installed we would like an Email to be sent to him as an invite can you please help us do that.

Mxisd Config

matrix.domain: *******
key.path: /var/mxisd/sign.key
storage.provider.sqlite.database: /var/mxisd/mxisd.db

logging:
  level:
    org:
      springframework: 'WARN'
      apache:
        catalina: 'WARN'
        directory: 'WARN'

lookup:
  recursive:
    enabled: true
    allowedCidr:
      - '0.0.0.0/0'

dns.overwrite.homeserver.client:
  - name: '${matrix.domain}'
    value: 'http://localhost:8008'

ldap.enabled: true
ldap.connection.host: '*******'
ldap.connection.bindDn: 'uid=*******,cn=users,cn=accounts,dc=earthlink,dc=iq'
ldap.connection.bindPassword: '*******'
ldap.connection.baseDn: 'cn=users,cn=accounts,dc=earthlink,dc=iq'
ldap.connection.tls: false
ldap.attribute.uid.type: 'uid'
ldap.attribute.uid.value: 'uid'
ldap.attribute.name: 'cn'
ldap.attribute.threepid.email:
  - 'mail'

ldap.attribute.threepid.msisdn:
  - 'telephoneNumber'

directory.exclude.homeserever: true

both "Mxisd" and the "home server" is behind nginx reverse proxy

maxidorius commented 6 years ago

I guess the email is already in LDAP for one of the possibly matched users?

nanohayder commented 6 years ago

yes the Email address in LDAP for all the users

maxidorius commented 6 years ago

then it's a limitation of the Matrix protocol and synapse. If mxisd, as an Identity server, returns the Matrix ID for that user (like it should), synapse will not make any attempt to inform the invited user since it has a Matrix ID already.

mxisd also has no way to know if the user exists, as the Identity server is not informed which homeserver queried it.

I would suggest making a global communication to your users that they should check the new Matrix service you'll provide to them.

nanohayder commented 6 years ago

ok then can you please help tell me how I get the Email of the user in the synapse DB I'm using ldap password provider but in the DB I can't find the Email address of the users and I'm not getting any notification should I change something from mixsd side or I that is on synapse side?

maxidorius commented 6 years ago

If you have Authentication integration, the email will be populated in the DB when the user login. But until they do the first login, nothing will be present.

Also, synapse will not send email to users that never logged in AFAIK, but I'm not a synapse developer, so you'll need to see that with them. Overall, the issue is on synapse side, not mxisd.

nanohayder commented 6 years ago

great thank you for this I will do the Authentication integration and check the Emails Thanks again. you can close this