element-hq / element-hq/element-meta
Stop using `.well-known/matrix/client` for client-side configuration settings
- Dominant language
- No language data
- Stars
- 112
- Forks
- 26
- Avg merge
- 6h 6m
- Merged PRs (30d)
- 4
Description
Some clients currently use the `.well-known/matrix/client` file to allow homeserver admins to set certain client-side options. For example, Element Web exposes a number of configuration options: https://github.com/element-hq/element-meta/blob/develop/docs/client_well_known.md.
This is problematic, for a number of reasons:
1. In practice, the people running the Matrix server and the people running the MXID domain may be entirely different; in many organisations, getting a file hosted on the top-level domain to be updated can be prohibitively difficult or even impossible.
2. Even if it is organisationally possible, it makes deployment unnecessarily complicated/difficult by separating configuration that would naturally be part of the homeserver to a completely different server.
3. It adds an unnecessary runtime dependency on the MXID domain: if the MXID domain is unreachable for any reason whilst the CS API domain remains active, clients will be unable to fetch their configuration options.
4. The need to serve a file on the MXID domain may require a web server to be hosted on a domain that would not otherwise need one (thanks to SRV delegation). Deploying a web server can be surprisingly onerous in configurations such as Kubernetes clusters.
5. It leads to considerable confusion about how best to implement this in clients, particularly if the user logs in by providing the CS-API address rather than a complete MXID. Specifically, should the client look up the .well-known file on the CS-API or on the MXID domain? Presumably, on the MXID domain, but that's not specified. Essentially, the spec doesn't allow for any use of `.well-known/matrix/client` except for endpoint discovery before login.
We should stop doing this, and instead provide a mechanism by which clients can discover configuration information via the C-S API.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the issue's linked Element client configuration documentation and the Matrix behavior around .well-known/matrix/client and the C-S API. Determine the proposed discovery mechanism and its specification scope before identifying affected documentation or project artefacts. Done means an agreed, implementable alternative is defined; the issue does not name files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100