matrix-org / matrix-org/matrix-spec
Allow appservices to specify and manage devices
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
**Suggestion**
Appservices should be able to specify, create and delete (virtual) devices.
The primary goal is to allow E2E Encryption for Appservices. This currently fails with Synapse when trying to use the `/_matrix/client/r0/keys/upload` endpoint (400 Bad Request), as Synapse cannot determine the device for which it should upload the keys. Therefore appservices should be able to specify the device to use in their requests and delete devices (to prevent cluttering the device list of a user and the necessary devices to verify/cross-sign).
**Potential expansion**
- Add query parameter `device_id` to specify the device id. If the device id is new to the homeserver it should create it and associate it with the given `user_id`
- Using the endpoint `/_matrix/client/r0/logout` with the `device_id` query parameter deletes the given device id. The endpoint `/_matrix/client/r0/logout/all` should also be supported to delete all known devices of the homeserver for the given user id.
- Maybe also allow the query parameter `initial_device_display_name` to set a custom name for the device when it's being created by the server.
Contributor guide
Research direction
Start by reviewing the Matrix client-server API behavior for /keys/upload, /logout, and /logout/all, including how requests identify users and devices. Define the specification changes needed for appservices to create, select, and delete devices, including the optional display name; done means the behavior and compatibility requirements are unambiguous.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100