-
Notifications
You must be signed in to change notification settings - Fork 385
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
MSC2379: Add /versions endpoint to Appservice API #2379
Open
Half-Shot
wants to merge
8
commits into
old_master
Choose a base branch
from
hs/msc-as-versions2
base: old_master
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.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
74dd80f
Add proposal
Half-Shot 09296ee
Rename MSC
Half-Shot 4fbe134
Fix formatting
Half-Shot 4ce981b
s/txnId/roomAlias
Half-Shot 7acdaa4
Switch to /versions
Half-Shot e139d4f
Spell out full path
Half-Shot 08d0261
Allow homeservers to ignore /versions less bridges
Half-Shot 0438fca
Remove information about legacy endpoints
Half-Shot 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 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,29 @@ | ||
# MSC 2379: Add /versions endpoint to Appservice API. | ||
|
||
Bridges do not have a way to specify what version of the spec they support. This means that if the path | ||
of any of the appservice endpoints were to change in the spec, homeservers would not be able to | ||
intelligently discover the paths that a bridge supports. | ||
|
||
## Proposal | ||
|
||
A new endpoint is required, which is `/_matrix/app/versions`. This is nearly identical to the | ||
[C-S API](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-versions) endpoint | ||
but lacks a `unstable_features` key, and is hosted by the appservice rather than the homeserver. | ||
|
||
All bridges MUST implement this endpoint and specify which version(s) of the `AS` API they support. | ||
The homeserver MUST send requests to the endpoints specified by that version of the AS spec. | ||
|
||
## Potential issues | ||
|
||
None | ||
|
||
## Alternatives | ||
|
||
This proposal previously used the `registration` file as a way to specify the supported version, but | ||
this was dropped as it was hard for the bridge to be authoritive over what version it supports. Typically | ||
the registration format is generated once by the bridge and then handled by the homeserver. If a bridge were | ||
to update and require a new version of the AS API, the registration data would need to be updated/regenerated. | ||
|
||
## Security considerations | ||
|
||
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.
Last thing I think I'd put in is a "Legacy Considerations" section that states if an appservice hasn't implemented
/versions
, a homeserver can choose to either assume it supports all AS API versions up until the one where this/versions
endpoint was introduced, or just deny connecting to it at all.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.
...but that's what I just deleted 😢
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 wanted the stuff about specifying new endpoints deleted, but this bit we should keep.