-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Let megolm session keys be available to devices added by invited users since the point they are invited #2713
Let megolm session keys be available to devices added by invited users since the point they are invited #2713
Comments
so we can encrypt for invited users' devices if the client wants. Closes element-hq/element-web#2713
fixes element-hq/element-web#2713. requires equivalent branch in js-sdk
Hopefully fixed by matrix-org/matrix-js-sdk#666, matrix-org/matrix-react-sdk#2042 and matrix-org/synapse#3484. |
These don't quite work for the edge case when an invited user adds devices after being invited but before they join, as they don't know who to tell about their new devices. So either it means invited users have to unilaterally participate in a room DAG (which is a (D)DoS vector), or we need to share megolm keys to the new devices after the event (if it turns out that the new devices are verified). Current conclusion is that we use KS reqs to paper over this edge case (perhaps with custom UX to reflect what's going on). https://docs.google.com/document/d/1_wDoDQ02JLZwYeVb-QVPylnJUXJVTZ9bNoGHd_Go6Zg/edit has notes on this. (Or alternatively we just make it a feature that you can't read history before you join a room, like WhatsApp does) EDIT: this has been expanded out into matrix-org/synapse#3504 |
Reopening as this hasn't quite been fixed yet; we need to handle the scenario where a user adds a device after the user is invited to the room. |
Thinking more about this while implementing MSC2444 peeking, I think the conclusion above is wrong (better late than never).
4 seems like a pretty nice solution to this, i think? |
(Alternatively, we could burn device lists with fire, as this whole problem only happens due to their fragility) |
Alternatively to 4: We could also have peeks be allowed for rooms a user gets invited to, see my comment on the peek MSC |
I ran into this issue as well, but as we're a few years later am wondering how the proposed solution would match with specs like matrix-org/matrix-spec-proposals#3083; there are now more ways to be granted access to a room. If you're granted access by a room because you're passing a join rule, I would argue it should be similar to being invited to the room directly; i.e.: you should also be able to decrypt messages from that point onwards. edit: just found this which seems related: element-hq/element-meta#646 |
Device dehydration might partially solve this issue (though we also need to consider what happens when the dehydrated device gets rotated). |
The history on this is very confusing. I don't think there's anything here that isn't covered by element-hq/synapse#3504, so I'm going to close it. |
Closely related to matrix-org/matrix-spec-proposals#2286 - when we invite someone into a room we should give them enough megolm session data to let them decrypt the messages that they should be able to view before joining (if any).
The text was updated successfully, but these errors were encountered: