feature request: Root name delegation support.
- 主要語言
- Rust
- 星號
- 236
- 分支
- 25
- 平均合併
- 4 小時 30 分鐘
- 30 天內合併 PR
- 2
描述
Our home server is setup with [root name delegation](https://matrix-construct.github.io/tuwunel/deploying/root-domain-delegation.html) so when we login the URL of the home server is different from the name of the home server:
```bash
$ matrix-commander-rs --login password
Enter your Matrix homeserver (e.g. https://some.homeserver.org): https://matrix.mlug-au.org
Enter your full Matrix username (e.g. @john:some.homeserver.org): @kcexton:mlug-au.org
Enter Matrix password for this user:
Enter your desired name for the Matrix device that is going to be created for you (e.g. matrix-commander-rs): matrix-commander-rs-debug
Enter name of one of your Matrix rooms that you want to use as default room (e.g. !someRoomId or !someRoomId:some.homeserver.org): !smQQwfgY0XUzrlf4Z5:mlug-au.org
```
Issue #217 proposes decoupling the specification of the Matrix home server from the Matrix username.
PR #219 proposes changing the username line to:
```bash
Enter your full Matrix username (e.g. @john or @john:some.homeserver.org): @kcexton
```
However directly appending the host portion of the Matrix home server address to the username tries to log this user into mlug-au.org as the user `@kcexton:matrix.mlug-au.org` which is not a valid username due to [root name delegation](https://matrix-construct.github.io/tuwunel/deploying/root-domain-delegation.html).
We should adopt the Element client login convention where dropping the protocol prefix (https:// or http://) from the home server name provided automatically does a look up at `https://${ROOTNAME}/.well-known/matrix/client` to find the home server base URL.
PR #219 can then be extended (possibly in another PR) to support the login flow:
```bash
$ matrix-commander-rs --login password
Enter your Matrix homeserver (e.g. https://some.homeserver.org): mlug-au.org
Enter your full Matrix username (e.g. @john:some.homeserver.org): @kcexton
Enter Matrix password for this user:
Enter your desired name for the Matrix device that is going to be created for you (e.g. matrix-commander-rs): matrix-commander-rs-debug
Enter name of one of your Matrix rooms that you want to use as default room (e.g. !someRoomId or !someRoomId:some.homeserver.org): !smQQwfgY0XUzrlf4Z5:mlug-au.org
```
And this would successfully login as matrix-commander sets the home server base URL based on what it finds at the `.well-known/matrix/client` path of the server running at the root domain.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。