8go / 8go/matrix-commander-rs

feature request: Root name delegation support.

Offen
#220 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Rust
Sterne
236
Forks
25
Ø Merge
4 Std. 30 Min.
Gemergte PRs (30 T.)
2

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.