Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowUnconnectedMatrixUsers does not prevent idle kicks on matrix.org #1589

Open
progval opened this issue Aug 5, 2022 · 4 comments
Open
Labels
matrix.org-support Matrix.org specific problem possibly unrelated to the bridge T-Task Refactoring, enabling or disabling functionality, other engineering tasks.

Comments

@progval
Copy link
Contributor

progval commented Aug 5, 2022

Describe the bug
A Matrix user was just kicked from a plumbed room I am in, despite allowUnconnectedMatrixUsers being true

To Reproduce
Unclear, but here is the state event:

{
  "content": {
    "allowUnconnectedMatrixUsers": true
  },
  "origin_server_ts": 1659628246327,
  "sender": "@olasd:matrix.org",
  "state_key": "",
  "type": "org.matrix.appservice-irc.config",
  "unsigned": {},
  "event_id": "$44xiTG4wYseFyu14p1Dsmal6oWsNFXAUu_VtQM1-rbY",
  "room_id": "!lAZsOCrTyhrhnitJGE:matrix.org"
}

and the kick event:

{
  "content": {
    "membership": "leave",
    "reason": "You have been kicked for being idle",
    "avatar_url": "<redacted>",
    "displayname": "<redacted>"
  },
  "origin_server_ts": 1659690040855,
  "sender": "@appservice:libera.chat",
  "state_key": "<redacted>",
  "type": "m.room.member",
  "unsigned": {
    "replaces_state": "$n_D7q3gz4uRM74CDBpZnvbK8MN6wbnIN4VYEOY1NnkE",
    "prev_content": {
      "avatar_url": "<redacted>",
      "displayname": "<redacted>",
      "membership": "join"
    },
    "prev_sender": "<redacted>"
  },
  "event_id": "$xTrY1m3fABf6FbIUMwXb5voFGMY7PmVaZI01MzO4Reo",
  "room_id": "!lAZsOCrTyhrhnitJGE:matrix.org"
}
@progval
Copy link
Contributor Author

progval commented Aug 5, 2022

morguldir just pointed out this isn't actually a bug, and allowUnconnectedMatrixUsers isn't meant to prevent kicks, only disable the privacy filter.

But that seems weird, as the privacy filter is only meant as a last resort when kicks are not issued when they should. It also means there is no way to prevent the appservice from kicking Matrix users at all, besides dropping its PL (which sometimes requires tombstoning and recreating rooms)

@jaller94 jaller94 added T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements. matrix.org-support Matrix.org specific problem possibly unrelated to the bridge and removed T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements. labels Aug 8, 2022
@jaller94 jaller94 changed the title Matrix user kicked from plumbed room despite allowUnconnectedMatrixUsers allowUnconnectedMatrixUsers does not prevent idle kicks on matrix.org Aug 8, 2022
@jaller94
Copy link
Contributor

jaller94 commented Aug 10, 2022

I'm not really sure what to do with this ticket.
The idle kick got configured globally on the matrix.org LiberaChat bridge because we've been given a limited amount of connections by the LiberaChat team. It's our decision to kick idle users, so that the connection slots may be used by others.

This decision comes from the following:

  1. LibraChat requires that an IRC user must be able to see every bridged user in the IRC room. This is to know who is participating in a chat at a given time.
  2. LiberaChat has given us permission to a certain 5 digit amount of connections. (not being secretive, I don't know the exact amount of the top of my head)
  3. At some point the amount of open TCP connections becomes unstable. We could work around this, if we had a lot more connections available.

The room setting allowUnconnectedMatrixUsers allows the bridge to continue bridging IRC -> Matrix, even while the bridge is connecting more Matrix users to an IRC channel.
https://github.com/matrix-org/matrix-appservice-irc/blob/d871e997a09decd43e024c1954448d2b444c99a1/docs/room_configuration.md#allowunconnectedmatrixusers

@progval
Copy link
Contributor Author

progval commented Aug 10, 2022

  1. LibraChat requires that an IRC user must be able to see every bridged user in the IRC room. This is to know who is participating in a chat at a given time.

Don't they allow channel owners to override this for their own channels?

  1. LiberaChat has given us permission to a certain 5 digit amount of connections. (not being secretive, I don't know the exact amount of the top of my head)

it's 20000

@jaller94 jaller94 added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks. label Sep 8, 2022
@LuccoJ
Copy link

LuccoJ commented Mar 16, 2023

@jaller94 the problem is that when users get kicked for being idle from IRC, they get kicked on the Matrix side too. I've had many complains about that being absurd for places that are largely Matrix room. But the good news is that the allowUnconnectedMatrixUsers has the logical meaning "okay, I know that normally Liberal doesn't want IRC-to-Matrix bridging unless all Matrix users are also connected as IRC users, but I want that overridden for this room, because I've informed the IRC side that the channel is publicly logged in real time as require by the IRC administration, so I'm opting out of the privacy behavior".

How does that affect the idle kicks? Well, right nke it doesn't, but the contention is that with that enabled, you could still kick users from the IRC side, to comply with your user limit, while keeping them connected on the Matrix side. Then, as soon as they happen to speak again, they can instantly rejoin IRC.

Note that in my experience, many times users on the Matrix side don't even realize that they have been kicked from a room for this reason, and the ensuing debate is more painful than having some Matrix users not show up on the IRC side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
matrix.org-support Matrix.org specific problem possibly unrelated to the bridge T-Task Refactoring, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

3 participants