Domain-Connect / dc-template-linter

Domain Connect template linter
https://www.domainconnect.org/
Apache License 2.0
2 stars 1 forks source link

Non-global underscore names checked unnecessarily (SRV service field) #5

Closed pawel-kow closed 8 months ago

pawel-kow commented 8 months ago

This applies mainly to SRV service field, which by nature is a subordinate, not-global underscore name

See RFC 8552 Section 2:

Structurally, the registry is defined as a single, flat table of RR TYPEs, under node names beginning with underscore. In some cases, such as for use of an SRV record, the full scoping name might be multi-part, as a sequence of underscored names. Semantically, that sequence represents a hierarchical model, and it is theoretically reasonable to allow reuse of a subordinate underscored name in a different, global underscored context; that is, a subordinate name is meaningful only within the scope of the global underscored node name. Therefore, they are ignored by this "Underscored and Globally Scoped DNS Node Names" registry. This registry is for the definition of highest-level -- that is, global -- underscored node name used.

Example: hostmonster.com.email.json

    {
      "target": "emaildiscovery.cpanel.net",
      "type": "SRV",
      "service": "_autodiscover",
      "protocol": "_tcp",
      "name": "",
      "essential": "OnApply",
      "ttl": 14400,
      "priority": 0,
      "weight": 0,
      "port": 443
    }
dc-template-linter -loglevel info hostmonster.com.email.json
2024-02-19T19:21:08+01:00 INF global definition does not define this underscore host host=_autodiscover link=https://www.iana.org/assignments/dns-parameters/dns-parameters.txt template=hostmonster.com.email.json type=SRV

The DNS record that would be produced here would be:

_autodiscover._tcp.example.com. 14400 IN SRV 0 0 443 emaildiscovery.cpanel.net.

So "service" field is always a subordinate underscore label. Only "protocol' is a global underscore label.

kerolasa commented 8 months ago

Right, I jumped the gun there. SRV service is no longer underscore name checked after 61ce2c81e00051ddd03be77225c0df8400dc3acc.