zonemaster / zonemaster-backend

The Zonemaster Backend - part of the Zonemaster project
Other
14 stars 22 forks source link

Domain name encoding semantics #573

Open mattias-p opened 4 years ago

mattias-p commented 4 years ago

The RPCAPI documentation should clarify its semantics with regard to domain name encoding. In particular:

  1. Should test results be reused for domain names that different under byte-wise comparison but equivalent under IDNA-rules? E.g. should calls to start_domain_test for the following names return the same testid?
    • xn--hr-via.xn--dr-via.EXAMPLE
    • xn--hr-via.xn--dr-via.example
    • xn--hr-via.där.example
    • här.där.example
  2. What encoding is used for domain names in RPCAPI responses? Is it the exact same Unicode string that was submitted in some request? Which one? Should clients expect that domain names in responses are normalized through some transformation?
  3. What encoding is used for domain names in test result messages?
mattias-p commented 4 years ago

A conceivable approach for items 1 and 2 above is to only accept case-insensitive ASCII domain names in requests and always and return lower case ASCII domain names in responses.

It has been noted that it may be inconvenient for some consumers of the RPCAPI to deal with domain name encoding conversion on the client side. On the other hand, even if we accept Unicode domain names in request, clients may need to normalize domain name encodings in order to deal with transformed domain names in responses.