Closed karthanistyr closed 5 years ago
This is probably also why the federation tester shows self signed for draak.fr even if it is Let's Encrypt. https://matrix.org/federationtester#draak.fr
DNS results should only ever be tested against the root domain (i.e.
serverName
) for the purpose of reading SRV records.
No, this is not what the spec says: https://matrix.org/docs/spec/server_server/r0.1.1.html#resolving-server-names. If your well-known delegates to matrix.draak.fr, it is correct to then look for a SRV record at _matrix._tcp.matrix.draak.fr. The SRV record at _matrix._tcp.draak.fr
will be ignored, except by legacy Synapse versions.
Well then the problem is that the tester results are misleading at best.
There is an active recommendation to keep the SRV record on the root domain to support legacy systems, and so indefinitely (at least for the moment).
To show that none exist is not what I expected, when I took explicit steps for one to exist.
Le 9 févr. 2019 à 15:38, Richard van der Hoff notifications@github.com a écrit :
DNS results should only ever be tested against the root domain (i.e. serverName) for the purpose of reading SRV records.
No, this is not what the spec says: https://matrix.org/docs/spec/server_server/r0.1.1.html#resolving-server-names. If your well-known delegates to matrix.draak.fr, it is correct to then look for a SRV record at _matrix._tcp.matrix.draak.fr. The SRV record at _matrix._tcp.draak.fr will be ignored, except by legacy Synapse versions.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I've opened a new issue at #37
On a configuration with both SRV and .well-known set up, the tester should return the correct information for both delegation mechanisms.
What happened
Given the recommended setup for a delegated matrix host on a domain:
DNS results ( from https://matrix.org/federationtester/api/report?server_name=draak.fr) came back with the following:
Notice the "null" SRVCName and SRVRecords.
What should happen
The SRV record information should be populated with the correct information, with both SRVCName and SRVRecords filled in.
Some investigation
It looks like there is a logic error in the tester's handling of root domain vs. server hostname when looking up .well-known and SRV records.
When a .well-known is successfully detected and read, the
serverHost
changes to that of the actual server's host, and then the tester goes on to try to lookup_matrix._tcp.<serverHost>
which may (most probably) not exist. DNS results should only ever be tested against the root domain (i.e.serverName
) for the purpose of reading SRV records.In case .well-known and SRV record both exist but differ in values, .well-known should probably be the source of truth and the discrepancy should be conveyed that the SRV should match .well-known.