-
Notifications
You must be signed in to change notification settings - Fork 415
MSC4373: Server opt-out of specific EDU types #4373
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
Open
velikopter
wants to merge
9
commits into
matrix-org:main
Choose a base branch
from
velikopter:edutypes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+70
−0
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bf9c931
Server opt-out of specific EDU types
velikopter 86bb0a9
MSC number
velikopter eda5d6e
Clarify and use the already established types
velikopter 09f5f9e
the "but if" makes this a SHOULD NOT
velikopter c0e1c12
Caching
velikopter 6401f45
m.read -> m.receipt
velikopter 4e744a4
Add explicit note about ignoring these EDUs
velikopter 0ff8b03
Add proper alternatives, clarify absent keys and caching
velikopter 85767fc
EDU MAY be sent
velikopter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # MSC4373: Server opt-out of specific EDU types | ||
|
|
||
| Some servers may wish to not receive specific types of EDUs, such as presence, to | ||
| cut down on the amount of bandwidth used (as an example). | ||
|
|
||
| ## Proposal | ||
|
|
||
| ### `GET /_matrix/federation/v1/edutypes` | ||
|
|
||
| This endpoint dictates what types of EDUs the server wishes to receive. | ||
|
|
||
| The response for this endpoint is shaped like the following: | ||
|
|
||
| ```json | ||
| { | ||
| "m.presence": false, | ||
| "m.receipt": true, | ||
| "m.typing": true | ||
| } | ||
| ``` | ||
|
|
||
| The allowed types are: | ||
| * `m.presence` | ||
| * `m.receipt` | ||
| * `m.typing` | ||
|
|
||
| Other types of EDUs (signing key updates, device lists, to-device messaging, etc) | ||
| are likely unsafe to opt-out of. | ||
|
|
||
| This endpoint SHOULD NOT require authentication, but if provided, follow the normal | ||
| verification process. | ||
|
|
||
| If the EDU type is listed, and is set to `false`, any EDUs of that type | ||
| SHOULD NOT be sent to the target homeserver. The target server MUST ignore | ||
| EDUs of these types. | ||
|
|
||
| If the EDU type is set to `true` or absent, the EDU MAY be sent to the target | ||
| homeserver, unless other factors disallow it (such as room ACLs, where that is | ||
| relevant). | ||
|
|
||
| The endpoint response SHOULD be cached. Servers SHOULD read the `Cache-Control` | ||
| HTTP header, and max it out at a week, using a week if the header is absent | ||
| or malformed. | ||
|
|
||
| ## Potential issues | ||
|
|
||
| Older homeservers (or simply non-compliant ones) will still send unwanted EDUs, | ||
| although these can just be ignored. | ||
|
|
||
| ## Alternatives | ||
|
|
||
| An explicit allowlist is recommended over allowing everything with a list of keys | ||
| that SHOULD NOT be put in the list, to ensure important information in new EDU types | ||
| is not ignored or not sent to homeservers. | ||
|
|
||
| While the alternative design is more flexible, it introduces unnecessary risk by | ||
| defaulting to allowing filtering of all EDU types, which is bad for the reasons | ||
| described above. | ||
|
|
||
| ## Security considerations | ||
|
|
||
| None. | ||
|
|
||
| ## Unstable prefix | ||
|
|
||
| `/_matrix/federation/unstable/io.fsky.vel/edutypes` | ||
|
|
||
| ## Dependencies | ||
|
|
||
| None. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: