Skip to content

Commit e934a35

Browse files
committed
MSC4383: Client-Server Discovery of Server Version
1 parent 24f045b commit e934a35

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# MSC4383: Client-Server Discovery of Server Version
2+
3+
### Proposal
4+
5+
An object is added to the top-level of `GET /_matrix/client/versions`[^1] named `server` with
6+
parity to the eponymous object returned by `GET /_matrix/federation/v1/version`[^2].
7+
8+
Example of the `server` object:
9+
10+
```
11+
"server": {
12+
"name": "My_Homeserver_Implementation",
13+
"version": "ArbitraryVersionNumber"
14+
}
15+
```
16+
17+
Example of a full response:
18+
```
19+
{
20+
"server": {
21+
"name": "My_Homeserver_Implementation",
22+
"version": "ArbitraryVersionNumber"
23+
},
24+
"unstable_features": {
25+
"org.example.my_feature": true
26+
},
27+
"versions": [
28+
"r0.0.1",
29+
"v1.1"
30+
]
31+
}
32+
```
33+
34+
##### Unstable prefix
35+
36+
| Stable identifier | Purpose | Unstable identifier |
37+
| --- | --- | ---|
38+
| `server` | Server information | `net.zemos.msc4383.server` |
39+
40+
### Alternatives
41+
42+
The status quo requires a client to query the federation version endpoint. It is the only known
43+
example of a cross-boundary request to have any use[^5] to an implementation[^3], motivating
44+
this proposal to reestablish a clean partition. This status quo alternative is problematic: the
45+
partition in the `/_matrix` URL hierarchy is understood by site-administrators to allow for distinct
46+
middleware configurations. Sites commonly employ WAF rules covering the client and federation
47+
hierarchies with source and destination assumptions. Some sites disable the entire federation
48+
portion, rendering the status quo as unreliable.
49+
50+
MSC2301[^4] enriches the discovery information, including some identifying information about the
51+
server, though specific formal vendor and semantic version information appears avoided
52+
(see: potential issues).
53+
54+
### Potential Issues
55+
56+
Server vendor and version information has been considered counter-productive to the motivations
57+
of Matrix as a unifying communication standard. Matrix believes any use of implementation
58+
knowledge as a condition in its applications always represents an accidental failure of its
59+
implementations or the standard binding them; the solution to such problems is thus found in
60+
cooperation, community and conformity, precluding the need for bug-for-bug conditions and
61+
workarounds. This MSC has the option of including a normative statement which inhibits the use
62+
of vendor information to determine functionality.
63+
64+
### Security Concerns
65+
66+
The federation endpoint is the only location which presently reveals this information.
67+
Site-administrators which have taken some measure to hide, or obscure, or modify it (i.e. with a
68+
proxy) will have to note their implementation's new exposure of it when upgrading.
69+
70+
71+
[^1]: https://spec.matrix.org/v1.16/client-server-api/#api-versions
72+
73+
[^2]: https://spec.matrix.org/v1.16/server-server-api/#server-implementation
74+
75+
[^3]: https://github.com/matrix-org/matrix-rust-sdk/blob/d228bde8ef51a98da10a6b7d4b9f3e5b8f49ad3c/crates/matrix-sdk/src/client/mod.rs#L581-L616
76+
77+
[^4]: https://github.com/matrix-org/matrix-spec-proposals/pull/2301
78+
79+
[^5]: Server version information can provide useful context in logs and may be essential for
80+
effective crash reports.

0 commit comments

Comments
 (0)