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

MSC2212: Third party user power levels #2212

Open
wants to merge 4 commits into
base: old_master
Choose a base branch
from

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Aug 1, 2019

@turt2live turt2live added proposal-in-review proposal A matrix spec change proposal labels Aug 1, 2019
@turt2live turt2live changed the title Proposal for third party user power levels MSC2212: Third party user power levels Aug 1, 2019
@turt2live turt2live added the unassigned-room-version Remove this label when things get versioned. label Aug 1, 2019
Co-Authored-By: David Vo <auscompgeek@users.noreply.github.com>
@turt2live
Copy link
Member Author

turt2live commented Aug 28, 2019

This is a prerequisite for Canonical DMs and hasn't received a lot of traffic. We intend to make Canonical DMs a thing very soon, so in the interest of moving the ball forward:

@mscbot fcp merge

@mscbot
Copy link
Collaborator

mscbot commented Aug 28, 2019

This FCP proposal has been cancelled by #2212 (comment).

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.

@mscbot mscbot added proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. disposition-merge labels Aug 28, 2019
Copy link
Member

@uhoreg uhoreg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broadly looks fine. Just a concern about redactions.

stripped except for `key_validity_url` and `public_key`.
2. Redacting a `m.room.member` event must additionally preserve `third_party_invite` under
`content`. All fields are stripped from the `third_party_invite` object with the exception
of `signed`, which additionally has all fields stripped with the exception of `mxid`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't stripping the fields out of signed cause the signature in signatures to be invalid? Looking at the synapse code, it looks like it is verifying the signature on the whole object, not just the mxid and token fields.

(As an aside, the spec for the signed field in m.room.member seems a bit confusing, since I think it should be referring to the Signing JSON section, rather than Signing Events )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not stripped? signed contains signatures, which are both preserved by this sentence.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you strip all fields other than mxid, signatures, and token, then the signature will no longer be valid, since the signature covers all fields under signed, and not just mxid and token. E.g., if someone sends a m.room.member event with the fields mxid, signatures, token, and foo, then if you strip out foo, then the signature will no longer be valid. So you need to retain the entirety of signed. (From an abuse mitigation standpoint, I don't think that this should be much of an issue since clients don't display the contents of signed.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, that's irritating. We should probably ensure things that make sense only get signed and not random keys, however making that rule future proof is difficult :(

# Third party user power levels

This MSC is a requirement for [MSC2199](https://github.com/matrix-org/matrix-doc/pull/2199)
to work in Matrix. It serves little value outside of MSC2199 due to the ability of users
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does allow for users who were invited via a third-party ID to claim their power level immediately rather than waiting for someone else to promote them.

@uhoreg
Copy link
Member

uhoreg commented Sep 12, 2019

Since this is the only issue I have with the proposal and the rest looks fine, I'll check my box and log a concern.

@mscbot concern redacting things from signed will break the signature

The new field has auth rules very similar to `users`:
1. Taking place immediately after 10a (requiring `users` to be a specific shape): If the
`third_party_users` in `content` is not a dictionary with keys that are known tokens
for `m.room.third_party_invite` events in current room state with values that are
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum. For state resolution, I think we need to be able to auth PL events without reference to the rest of the room state. @erikjohnston might be able to correct me on this?

We can probably just remove that restriction?

1. Taking place immediately after 10a (requiring `users` to be a specific shape): If the
`third_party_users` in `content` is not a dictionary with keys that are known tokens
for `m.room.third_party_invite` events in current room state with values that are
integers (or a string that is an integer), reject.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we allow strings?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the auth rules already do

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh. yes. would it be plausible to fix that while we're here?

+1 to making the rule for third_party_users match that for users, anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a bit scope creepy but one line never hurt anyone - will convert both rules to be just ints.

@turt2live turt2live added the kind:core MSC which is critical to the protocol's success label Apr 20, 2020
@anoadragon453
Copy link
Member

Cancelling FCP proposal as this proposal lacks an implementation.

@mscbot fcp cancel

@mscbot mscbot removed the proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. label Oct 2, 2020
@turt2live turt2live added requires-room-version An idea which will require a bump in room version and removed unassigned-room-version Remove this label when things get versioned. labels Apr 6, 2021
@turt2live turt2live added the needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. label Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:core MSC which is critical to the protocol's success needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal requires-room-version An idea which will require a bump in room version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants