-
Notifications
You must be signed in to change notification settings - Fork 411
MSC4350: Permitting encryption impersonation for appservices #4350
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
Signed-off-by: Tulir Asokan <[email protected]>
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:
- Bridge or other appservice making use of impersonation
- Client that validates impersonation requirements
- Server that exposes
signatures
properly
* the user who owns the impersonatable device has cross-signing keys and the | ||
impersonatable device is not signed by the user's self-signing key |
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.
What happens if there are no cross-signing keys?
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.
Then the device is trusted with just the impersonator's signature
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.
Have added a paragraph below the bullet to call it out explicitly
The `algorithms` and `keys` fields are still present and required, but MUST be | ||
empty when an impersonator is defined. Because there are no keys, `signatures` |
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.
What does this mean? Both fields need to be set to an empty list?
If so, I think it would be better to say it like that explicitly. And second, why require them to be defined but be an empty list?
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.
The fields are currently required, so the main reason is to avoid changing that. They could totally be removed too if that's preferred, I was mostly thinking about what would cause the least unexpected behavior in old clients.
|
||
The device owned by the ghost user (or real Matrix user in case of double | ||
puppeting) with the `impersonator` field will be referred to as the | ||
"impersonatable" device, while the bridge bot's device is the "impersonator" |
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.
Given that the "impersonatable device" has no keys, in what way is it a device being impersonated? Rather, I believe "impersonatable device" is a bit of a misnomer; it is simply a way for a user to specify a foreign device that is allowed to impersonate them. It is the user being impersonated, not any specific device of theirs.
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.
Yeah need to figure out some better terms. The impersonator is the bridge bot's device which is obvious enough, but I'm not sure what to call the device entry that points at the impersonator without it being confusable with the impersonator itself.
The requirement to cross-sign the impersonatable device could be bypassed by a | ||
malicious server that hides the user's cross-signing keys. However, hiding | ||
cross-signing will also prevent other devices of that user from working, so it | ||
should be easily noticeable. |
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 think this is concerning and should likely be fleshed out more. Can you spell out why hiding the cross-signing keys would stop other devices from working?
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.
If you require cross-signing for real devices with keys (as per MSC4153), then suppressing cross-signing keys server-side will make clients stop encrypting messages to those devices and hide messages from those devices.
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.
The security consideration now specifically mentions MSC4153 as the reason why it should be safe
Rendered