matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
467 stars 152 forks source link

/querynetworks endpoint responds with HTTP 403 #1358

Closed mweinelt closed 3 years ago

mweinelt commented 3 years ago

Describe the bug We're trying to setup matrix-dimension and are giving it the url to the appservice that is specified in the registrations.yml. That one is http://127.0.0.1:8009.

Then it tries to query available networks and that fails because matrix-appservice-irc denies it.

matrix-appservice-irc[24466]: 2021-05-28 02:00:48 INFO:IrcBridge 127.0.0.1 - - [28/May/2021:00:00:48 +0000] "GET /_matrix/provision/querynetworks HTTP/1.1" 403 54 "-" "-"

or via cURL

[root@matrix:~]# curl http://127.0.0.1:8009/_matrix/provision/querynetworks 
{"errcode":"M_FORBIDDEN","error":"Bad token supplied"}

Matrix Dimension on the other hand warns that this API is unauthenticated, so I'm not sure if matrix-dimension needs updating or how and what authentication to pass in.

To Reproduce Steps to reproduce the behavior:

  1. Try to configure matrix-dimension for IRC bridging
  2. Notice that matrix-appservice-irc denies access to /querynetworks endpoint, possibly others

Expected behavior Either matrix dimension should notify me about an authentication requirement or appservice-irc should allow me to query networks unauthenticated.

Screenshots image

Additional context Element 1.7.29 matrix-appservice-irc https://github.com/matrix-org/matrix-appservice-irc/commit/02591d4a2fb82457a67fd30e3c763f4c6278a676 matrix-dimension https://github.com/turt2live/matrix-dimension/commit/b97a0f4bc2a6dc4e2b4080762d84dc659f539b77

mweinelt commented 3 years ago

matrix-appservice-irc, through matrix-appservice-bridge, checks autentication on the provisoining endpoint, so matrix-dimension needs to be updated to reflect that.