-
Notifications
You must be signed in to change notification settings - Fork 405
MSC4311: Ensuring the create event is available on invites and knocks #4311
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation requirements:
- Server (returning stripped state)
- Server (receiving stripped state) - See comment below
- Client (receiving stripped state)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meowlnir (client/bot replacing room ID parsing with creator parsing in invite antispam): maunium/meowlnir@eeccd4a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though servers haven't actually added the validation on the stripped state yet, per the migration section of the MSC, no one has indicated that it's a nightmare to do so. I'm inclined to consider that "implementation" for the purposes of starting FCP, but welcome (particularly SCT) opinions on whether that's valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Server returning and receiving: https://gitlab.com/famedly/conduit/-/commit/532b17ade86b4373db9f3bcca6af6815dd9b5b10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This MSC now requires all stripped state events to be PDUs over federation. I believe element-hq/synapse#18822 and matrix-org/complement#796 demonstrate it's not impossible, even if the code itself is bad.
MSCs proposed for Final Comment Period (FCP) should meet the requirements outlined in the checklist prior to being accepted into the spec. This checklist is a bit long, but aims to reduce the number of follow-on MSCs after a feature lands. SCT members: please check off things you check for, and raise a concern against FCP if the checklist is incomplete. If an item doesn't apply, prefer to check it rather than remove it. Unchecking items is encouraged where applicable. Checklist:
|
Though I've just pushed a refactor of this MSC, the vast majority has had healthy discussion prior and appears to have settled and should therefore be ready for FCP. There's an open question on the implementation requirements, but I hope to at least collect tickyboxes until implementation can be drafted (possibly next week). @mscbot fcp merge |
@mscbot concern inconsistency between event types feels like an unnecessary complication |
This MSC shifts the `m.room.create` event to a *required* stripped state event, and imposes validation | ||
to ensure the event matches the room. To support the new validation, the `m.room.create` event must | ||
be formatted as a full PDU in the stripped state of [invites](https://spec.matrix.org/v1.15/server-server-api/#put_matrixfederationv1inviteroomideventid) | ||
over federation. Similar treatment is applied to other stripped state events for uniformity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar treatment is applied to other stripped state events for uniformity.
But why, aside from vdh's general ick feeling of having 2 data types in the same array? By doing it for all events:
- we add more bandwidth to invites
- we don't gain any more security as the events can't be verified via their auth chains
- we risk giving the impression that we are authorising all events in
invite_room_state
, which we ain't.
To fix the ick, I'd rather we moved the create event to be a new key outside of invite_room_state
and leave invite_room_state
as-is, although that would either be backwards incompatible (the create event would be missing from invite_room_state
) or duplicate the create event fields if we keep the create event in invite_room_state
for a while.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference: this follows on from two previous threads (1, 2) where this was discussed in detail.
we add more bandwidth to invites
This feels negligible though.
we don't gain any more security as the events can't be verified via their auth chains
It is not proposed as a security improvement; rather as one that makes the API more consistent.
we risk giving the impression that we are authorising all events in invite_room_state, which we ain't.
I really don't buy this argument. The fact that an event is passed over the federation API doesn't say anything to me about whether it is authorised or not.
I'll also re-emphasise that if you stick to the "full PDUs make people think that they are authorised" argument, then we have to do something different here for pre-v12 rooms (see previous thread) which is also gnarly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This [additional bandwidth] feels negligible though.
To you perhaps, but this is the main reason why we have the concept of stripped state events at all vs sending full-fat PDUs.
I don't feel strongly on this. Having stripped state always be the full-fat PDU seems fine.
This MSC shifts the `m.room.create` event to a *required* stripped state event, and imposes validation | ||
to ensure the event matches the room. To support the new validation, the `m.room.create` event must | ||
be formatted as a full PDU in the stripped state of [invites](https://spec.matrix.org/v1.15/server-server-api/#put_matrixfederationv1inviteroomideventid) | ||
over federation. Similar treatment is applied to other stripped state events for uniformity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference: this follows on from two previous threads (1, 2) where this was discussed in detail.
we add more bandwidth to invites
This feels negligible though.
we don't gain any more security as the events can't be verified via their auth chains
It is not proposed as a security improvement; rather as one that makes the API more consistent.
we risk giving the impression that we are authorising all events in invite_room_state, which we ain't.
I really don't buy this argument. The fact that an event is passed over the federation API doesn't say anything to me about whether it is authorised or not.
I'll also re-emphasise that if you stick to the "full PDUs make people think that they are authorised" argument, then we have to do something different here for pre-v12 rooms (see previous thread) which is also gnarly.
@mscbot resolve inconsistency between event types feels like an unnecessary complication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some light editing of the intro
@@ -0,0 +1,105 @@ | |||
# MSC4311: Ensuring the create event is available on invites and knocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# MSC4311: Ensuring the create event is available on invites and knocks | |
# MSC4311: Ensuring the create event is available on invites |
Historically, when processing an invite or knock, safety tooling would parse the room ID despite | ||
[being opaque](https://spec.matrix.org/v1.15/appendices/#room-ids) to determine the server which | ||
originally created the room. If that server was considered abusive, the incoming invite or outbound | ||
knock may be rejected or blocked early by the tooling. This approach is preferred because the user | ||
sending the invite may not be on the same server as the user who created the room, though both sender | ||
and creator are checked by safety tooling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Historically, when processing an invite or knock, safety tooling would parse the room ID despite | |
[being opaque](https://spec.matrix.org/v1.15/appendices/#room-ids) to determine the server which | |
originally created the room. If that server was considered abusive, the incoming invite or outbound | |
knock may be rejected or blocked early by the tooling. This approach is preferred because the user | |
sending the invite may not be on the same server as the user who created the room, though both sender | |
and creator are checked by safety tooling. | |
Historically, when processing an incoming invite or outgoing knock, safety tooling would parse the room ID despite | |
[being opaque](https://spec.matrix.org/v1.15/appendices/#room-ids), to determine the server which | |
originally created the room. If that server was considered abusive, the invite or | |
knock may be rejected or blocked early by the tooling. Note that checking the domain of the | |
sender of an invite is inadequate, because the sender may not be on the same server as the | |
user who created the room. |
impossible when the create event is missing or incomplete, as the room ID cannot be confirmed in | ||
MSC4291+ room versions. | ||
|
||
This MSC shifts the `m.room.create` event to a *required* stripped state event, and imposes validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This MSC shifts the `m.room.create` event to a *required* stripped state event, and imposes validation | |
To mitigate the problem in the case of invites, | |
this MSC shifts the `m.room.create` event to a *required* stripped state event, and imposes validation |
Rendered
Disclosure: I am Director of Standards Development at The Matrix.org Foundation C.I.C., Matrix Spec Core Team (SCT) member, employed by Element, and operate the t2bot.io service. This proposal is written and published with my role as a member of the SCT.
Dependencies:
SCT Stuff:
FCP tickyboxes
MSC checklist