-
Notifications
You must be signed in to change notification settings - Fork 399
MSC4293: Redact on ban #4293
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?
MSC4293: Redact on ban #4293
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.
yes please!
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 - Add support for MSC4293 - Redact on Kick/Ban element-hq/synapse#18540
- Sending client - Set MSC4293 flag when autoredacting users mjolnir#612
- Receiving/applying client:
Other non-qualifying (as of writing) implementations:
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:
|
With my SCT hat, I've verified the implementations (though welcome second/third opinions) |
This has gone through quite a few rounds of review in various T&S circles, and has healthy code review to show that teams are interested in supporting this feature. With my SCT hat, I think this is ready for FCP, especially to help encourage more client implementations. @mscbot fcp merge |
Team member @mscbot has proposed to merge this. The next step is review by the rest of the tagged people: Concerns:
Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for information about what commands tagged team members can give me. |
If the sender is allowed to redact, the redaction behaviour continues until the membership event itself | ||
is redacted (thus removing the field), another membership event removes the field, or the flag is set |
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.
Why redact the event itself instead of just stopping at it?
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.
err, sorry: the membership event is not redacted by the autoredaction stuff. It's just that since we're doing this without a room version, the flag is at risk of being redacted off the event (technically).
We otherwise keep redacting after the ban because of eventual consistency and delayed receipt of events.
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.
I feel like this says the opposite?
until the membership event itself is redacted
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.
I can see how that might be interpreted that way, but it is not the intention. It's trying to clarify to server implementations that they won't be able to see the redact_events
flag on the event if the membership event itself is redacted, and therefore the autoredact behaviour also ceases at that point in time.
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.
I've read this a handful of times now and I can't interpret it any other way.
If the sender is allowed to redact, the redaction behaviour continues until the membership event itself | |
is redacted (thus removing the field), another membership event removes the field, or the flag is set | |
If the sender is allowed to redact, the redaction behaviour continues until a membership event for | |
that user is reached which does not have the flag set or has the flag set |
redactions will "make it" over federation to another server. This is why mass redaction approaches | ||
are preferred, as they are significantly more reliable. | ||
|
||
## Potential issues |
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.
Doesn't this potentially have weird behavior if a server redacts the events, redacts the membership event itself, then backfills events? It is unclear to me if this is covered the text below (or above in fallback behavior?)
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.
it should be covered in the potential issues, but I'll aim to clarify in the text. The short version is: yes, it's weird, but not any more weird than usual. A server which requests events from a server that redacted them will receive redacted copies. This infectious behaviour is a feature, though if a server really wanted to it could ask other servers until it finds an unredacted copy.
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.
I'm worried about the opposite -- receiving unredacted events and not knowing they should be redacted.
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.
That should already be addressed in the MSC, as a known limitation.
Similar to regular redactions, if the sender of the membership event can't actually redact the target's | ||
events, the redaction doesn't apply. This means having a power level higher than or equal to `redacts` | ||
*and* `events["m.room.redaction"]` (if set). We maintain the `events` check despite not actually sending | ||
events of that type to keep the same expectations within rooms. If the sender doesn't have permission | ||
to redact an event normally, no redaction is applied. |
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.
Can a user send this when leaving a room? Not in the case of kick but to self redact all.
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.
No, self-leaves are not permitted by this MSC. Rationale being it opens a can of worms I'd rather not get this MSC stuck in.
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.
Ok, I think that's unclear that the behavior only applies if the sender and state key don't match then.
a dedicated event to clean up the spam. In a typical case, a user will get kicked/banned from a room | ||
and the moderators will further redact some or all of their messages. Mass redactions have more use | ||
cases, but the specific case of "redact everything upon ban" is something which may be easily backported | ||
to existing room versions. |
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.
I don't think I'm quite getting this proposal. So it's just a temporary measure to do mass redactions in old room versions? Why not just a separate 'mass redact' endpoint? Or, for that matter, have the HS look for mass redact events sent into old room versions and do them manually exactly as it would do here?
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.
MSC4194 is a prior exploration of a mass redact endpoint for this use case. A reason for collecting the responsibilities into a flag on the ban event are because of the following complications:
- The homeserver applying redactions would also need to send redactions for future soft failed events as well as already received historical events.
- Toggling this behavior is complicated: should a user rejoin, the behavior would probably need to be tied to membership in the same way as in this proposal.
- The endpoint will always be used after a room member is banned. There isn't another use case with exception of self redaction which is intentionally being ignored by both proposals.
- Without mass redaction events, federating individual redaction events takes longer than a single ban event which can flag to clients to hide all content associated with a user before redaction events arrive. Which is critical in spam attacks1.
Footnotes
-
And also consider that soft failure is common and it's not likely that there will be just "one" mass redact event needed to cleanup per spam incident. ↩
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.
As Gnuxie mentions, we can't/shouldn't be sending 1:1 redaction events anymore, especially post-ban (the original sender can't "self-redact", and the moderator who did the ban may have left). This MSC specifically tries to reduce the number of redaction events to zero if it can, or one in the worst case - mass redactions themselves would be the "one" case.
The issue with mass redact events is that they aren't backwards compatible to existing room versions, which will cause breakage. We could spend some time trying to fix this (fallback fields, different event types, etc), but those solutions don't look as great (in my opinion) and slow down the rollout of the feature due to broader use cases needing consideration.
We (T&S) expect that both redact-on-ban and mass redactions will be used in future room versions concurrently for different use cases, and require a more immediate solution to 1:1 redaction event sending.
I'll cover this in the alternatives section when I loop back around for an edit.
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.
I'm afraid I may be more confused if anything. I was assuming the HS would do something to make this backwards compatible but now I wonder if I've misunderstood that. What makes this backwards compatible given a mass redaction isn't? If this is not a short-term measure, in what circumstances would this be used vs a mass redaction? In any case, hopefully the edit should make things clearer. The info in the responses here probably needs to go into the MSC.
`true`, causes servers (and clients) to redact all of the user's events as though they received an | ||
[`m.room.redaction`](https://spec.matrix.org/v1.14/client-server-api/#mroomredaction), including | ||
adding [`redacted_because`](https://spec.matrix.org/v1.14/client-server-api/#redactions) to `unsigned` | ||
where applicable. An `m.room.redaction` event is not actually sent, however. |
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.
Later on in the proposal, it's said several times that sending redactions as fallback support is intended, so I'm getting mixed signals here. When this flag is passed, should the server send actual redactions or not? I assume it's "yes, send actual redactions, until greater adoption makes them redundant" from later paragraphs, however it is not clear.
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.
"yes, send actual redactions, until greater adoption makes them redundant"
If this is the implication then it shouldn't be. Redactions will always need to be sent in legacy room versions. And if the proposal has been written with otherwise then that's a pretty serious issue. @turt2live could you please clarify?
My understanding was that redaction events would have to be sent for all room versions prior to the inclusion of MSC4298.
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.
TLDR: "yes, send actual redactions if you want to, until greater adoption makes them redundant" (added emphasis mine) is accurate.
Fallback behaviour is a bit of an awkward case for MSCs. In this case, the intended change is meant to be additive to the spec with no actual requirement to send redaction events (even in existing room versions), but there are several implementations of Matrix clients and servers which already exist today that won't know how to handle this new behaviour, and thus senders are encouraged (not required) to send "fallback redactions".
The MSC does give some guidance on what fallback behaviour might look like, but leaves removal of that fallback behaviour up to the individual projects. One project may, for example, decide that pre-MSC4298 rooms will forever get fallback redactions while another decides that 3 months from spec release there is enough client implementations to safely drop the fallback support. Some implementations may also choose somewhere in the middle of that spectrum: instead of chasing events and retrying redactions, it could do a single query and send redactions once, leaving any errors to hopefully be picked up by the redact-on-ban flag.
Neither this MSC or MSC4298 make the fallback behaviour required, either for existing room versions or implementations of Matrix.
@mscbot concern General clarity/understanding of goals and alternatives |
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 as a Trust & Safety team member allocated in full to the Foundation.
MSC checklist
FCP tickyboxes