Closed mrjohnson22 closed 4 years ago
ma1sd search bindings in the identity storage. One of the easiest path is to use the synapse database. So, if none of the identity storage was configured then ma1sd never find this bindings. I can add the internal identity storage to store this bindings if it is impossible to use synapse database or others identity storage (i.e. LDAP).
My Synapse database's identity storage is correct, though. With psql synapse
, manually running the query specified by synapseSql.lookup.query
returns a list of users who had bound their email addresses to Synapse.
Could it be that ma1sd isn't connecting to my Synapse database properly? How would I check that? synapseSql.connection
should be correct, as it matches the same values used by database.args
in my Synapse's homeserver.yaml
.
It turns out my config was the problem after all. The second synapseSql
block overrides the first, meaning that enabled
, type, and
connection` remain unset. Looking a bit higher in the logs shows that the synapseSql store was disabled entirely.
@ma1uta I'll leave it up to you to decide if split configuration blocks should be allowed. If not, you may close this case.
I cannot split configuration because I should support backward compatibility any way.
Reproduction steps:
_matrix/identity/v2/validate/email/requestToken
gets a numericsid
as a response._matrix/identity/v2/account
responds with myuser_id
.The problem: Closing & reopening the Settings window still has the "Share" button next to the email address that should have been shared already. POST
_matrix/identity/v2/lookup
responds with an emptymappings
object.Expected results: The lookup of my just-shared email should succeed.
Other info:
The
accepted
andhashes
tables in ma1sd's database are empty, butaccount
is not.My (partially redacted) config:
server: name: 'identity.domain'
key: path: '/var/lib/ma1sd/keys'
storage: backend: postgresql provider: postgresql: database: '//localhost/ma1sd' username: 'user' password: 'pass'
synapseSql: enabled: true type: 'postgresql' connection: '//localhost/synapse?user=synapse_user&password=pass'
threepid: medium: email: identity: from: "noreply-id@domain" name: "Name" connectors: smtp: host: "localhost" tls: 0 port: 25
hashing: enabled: true pepperLength: 20 rotationPolicy: per_requests hashStorageType: sql algorithms:
synapseSql: lookup: query: 'select user_id as mxid, medium, address from user_threepids' legacyRoomNames: false
logging: root: debug app: debug
INFO io.kamax.mxisd.auth.AccountManager - Found account for user: @mxid:domain INFO io.kamax.mxisd.http.undertow.handler.auth.v2.AccountGetUserInfoHandler - Get User Info. INFO io.kamax.mxisd.http.undertow.handler.auth.v2.AccountGetUserInfoHandler - Account found: @mxid:domain INFO io.kamax.mxisd.auth.AccountManager - Found account for user: @mxid:domain INFO io.kamax.mxisd.session.SessionManager - Server 127.0.0.1 is asking to create session for io.kamax.matrix.ThreePid@deadbeef (Attempt #1) - Next link: null INFO io.kamax.mxisd.session.SessionManager - No existing session for io.kamax.matrix.ThreePid@deadbeef INFO io.kamax.mxisd.session.SessionManager - Generated new session 1234567891234 to validate io.kamax.matrix.ThreePid@deadbeef from server 127.0.0.1 INFO io.kamax.mxisd.session.SessionManager - Stored session 1234567891234 INFO io.kamax.mxisd.session.SessionManager - Session 1234567891234 for io.kamax.matrix.ThreePid@deadbeef: sending validation notification INFO io.kamax.mxisd.threepid.generator.GenericTemplateNotificationGenerator - Generating notification content for 3PID Session validation INFO io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector - Sending email to email@domain via SMTP using localhost:25 INFO io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector - Connecting to localhost:25 INFO io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector - Not using SMTP authentication INFO io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector - Email to email@domain was sent INFO io.kamax.mxisd.http.undertow.handler.identity.share.SessionValidationGetHandler - Handling GET request to validate session INFO io.kamax.mxisd.session.SessionManager - Validating session 1234567891234 INFO io.kamax.mxisd.session.SessionManager - Session 1234567891234 is from 127.0.0.1 INFO io.kamax.mxisd.session.SessionManager - Session 1234567891234 has been validated INFO io.kamax.mxisd.http.undertow.handler.identity.share.SessionValidationGetHandler - Session 1234567891234 was validated INFO io.kamax.mxisd.auth.AccountManager - Found account for user: @mxid:domain INFO io.kamax.mxisd.http.undertow.handler.auth.v2.AccountGetUserInfoHandler - Get User Info. INFO io.kamax.mxisd.http.undertow.handler.auth.v2.AccountGetUserInfoHandler - Account found: @mxid:domain INFO io.kamax.mxisd.auth.AccountManager - Found account for user: @mxid:domain INFO io.kamax.mxisd.session.SessionManager - Session 1234567891234: Binding of email:email@domain to Matrix ID @gxid:domain is accepted