SRV Records Incorrectly Require Same Domain

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.0.5, 4.1.1, 4.1.4
    • Component/s: Networking
    • None
    • ALL
    • Hide

      Create a SRV record on a domain that points to entries in a different domain.

      Show
      Create a SRV record on a domain that points to entries in a different domain.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When connecting to a domain via SRV record, each host in the SRV record is being checked to see if it is in the same domain as the SRV entry.

      Thus, if we have a SRV record that returns 3 hosts:

      _mongodb._tcp.example.org -> host1.domain.com, host2.domai.com, host3.otherdomain.com

       

      Mongo components return an error similar to: "Domain suffix from SRV record not matched input domain" or "Hostname host1.domain.com. is not within the domain example.org".

       

      Code that causes this is here: https://github.com/mongodb/mongo/blob/master/src/mongo/client/mongo_uri.cpp#L428-L432

      https://github.com/mongodb/mongo-tools/blob/master/common/connstring/connstring.go#L468-L488

       

              Assignee:
              Eric Sedor
              Reporter:
              Oliver Isaac
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: