Loosen DNS domain validation for SRV records to {second-level domain}.{TLD}

XMLWordPrintableJSON

    • Needed

      According to the Initial DNS Seedlist Discovery specification, "A driver MUST verify that the host names returned through SRV records share the original SRV's domainname. In addition, SRV records with fewer than three . separated parts, the returned hostname MUST have at least one more domain level than the SRV record hostname. Drivers MUST raise an error and MUST NOT initiate a connection to any returned hostname which does not fulfill these requirements."

      The parsing logic however assumes that the left-most part of a URL (period-separated) is the subdomain, and everything to the right of that is the domain. This can result in user-managed DNS records that should be valid being considered invalid.

      For example, if a DNS record of _mongodb._tcp.mongodb.mydomain.net contained regionally separated URLs in the form of:

      • mongodb1.us-east-1.mydomain.net
      • mongodb2.us-east-1.mydomain.net
      • mongodb3.us-west-1.mydomain.net

      this would be considered invalid.

            Assignee:
            Unassigned
            Reporter:
            Alex Bevilacqua
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: