Skip to content

Conversation

tulir
Copy link
Member

@tulir tulir commented Sep 10, 2025

@tulir tulir added e2e proposal A matrix spec change proposal client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Sep 10, 2025
Copy link
Member Author

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

Comment on lines +49 to +50
* 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
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

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

Comment on lines 34 to 35
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`
Copy link
Member

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?

Copy link
Member Author

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"
Copy link
Member

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.

Copy link
Member Author

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.

Comment on lines 170 to 173
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.
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-server Client-Server API e2e kind:feature MSC for not-core and not-maintenance stuff 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants