mautrix / signal

A Matrix-Signal puppeting bridge
GNU Affero General Public License v3.0
514 stars 75 forks source link

double puppeting stopped working with the shared secret method #542

Closed tom-ch1 closed 2 months ago

tom-ch1 commented 2 months ago

after an update to 0.7.0 (or maybe before), double puppeting stopped working. I tried to set it up using shared secret method described in https://docs.mau.fi/bridges/general/double-puppeting.html as well as trying to interpret the autogenerated config as well as the migrated config generated by the 0.7.0 update (see also #541)

environment:

relevant section in homeserver.yaml:

modules:
  - module: shared_secret_authenticator.SharedSecretAuthProvider
    config:
      shared_secret: "myVerySecretString"
      m_login_password_support_enabled: true
      com_devture_shared_secret_auth_support_enabled: false

relevant section in config.yaml:

homeserver:
    address: https://matrix.my.server.org
    domain: my.server.org
[... snip... ]
double_puppet:
    servers:
        anotherserver.example.org: https://matrix.anotherserver.example.org
    allow_discovery: false
    secrets:
        my.server.org: as_token:"myVerySecretString"

I tried with or without quotes around myVerySecretString, both did not work

mautrix-signal log: {"level":"error","user_mxid":"####","action":"setup double puppet","error":"failed to GET /_matrix/client/v3/account/whoami: M_UNKNOWN_TOKEN (HTTP 401): Invalid access token passed.","time":"2024-09-03T13:41:50.658062507+02:00","message":"Failed to create new user intent"}

matrix-synapse log: 2024-09-03 13:41:50,657 - synapse.api.auth.internal - 287 - WARNING - GET-60099 - Invalid access token in auth: <class 'pymacaroons.exceptions.MacaroonDeserializationException'> cannot determine data format of binary-encoded macaroon.

tulir commented 2 months ago

That's expected, the shared secret method was already deprecated before and has been removed completely now

tom-ch1 commented 2 months ago

That's expected, the shared secret method was already deprecated before and has been removed completely now

There's a misunderstanding then: deprecated is normally not the same as non-working. It would help to just write which version still supports this and which version stopped supporting it. As far as I can tell, support for shared secret method

tom-ch1 commented 2 months ago

to make double-puppeting work in mautrix-signal v0.7.0, see https://github.com/mautrix/signal/issues/541#issuecomment-2326469972