Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-3162

Add test for SRV hostname validation when resolver and resolved hostnames are identical with three domain levels

    • Needed
    • Hide

      Summary of necessary driver changes

      •  

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      •  

      Context for other referenced/linked tickets

      •  
      Show
      Summary of necessary driver changes   Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed)   Context for other referenced/linked tickets  
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-5988 Blocked
      CXX-3271 Blocked
      CSHARP-5570 Blocked
      GODRIVER-3539 Blocked
      JAVA-5850 Blocked
      NODE-6910 Blocked
      MOTOR-1456 Blocked
      PYTHON-5327 Blocked
      PHPLIB-1668 Blocked
      RUBY-3653 Blocked
      RUST-2200 Blocked
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } #scriptField td.willNotDo { background-color: #FF0000; /* Red color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-5988 Blocked CXX-3271 Blocked CSHARP-5570 Blocked GODRIVER-3539 Blocked JAVA-5850 Blocked NODE-6910 Blocked MOTOR-1456 Blocked PYTHON-5327 Blocked PHPLIB-1668 Blocked RUBY-3653 Blocked RUST-2200 Blocked

      Summary

      According to the MongoDB Initial DNS Seedlist Discovery specification, the requirement that returned hostnames contain an additional domain level applies only when the SRV hostname has fewer than three dot-separated parts. When the SRV hostname has three or more dot-separated parts, it is valid for the returned hostnames to be identical.

      We should add tests to ensure that drivers don't throw validation errors in the case described above.

      Motivation

      Who is the affected end user?

      Who are the stakeholders?

      How does this affect the end user?

      Are they blocked? Are they annoyed? Are they confused?

      How likely is it that this problem or use case will occur?

      Main path? Edge case?

      If the problem does occur, what are the consequences and how severe are they?

      In PYTHON-5288, when using a mongodb+srv connection string, the driver throws an error if the hostname used for SRV resolution is identical to one of the resolved hostnames, even when the hostname contains three or more dot-separated parts.

      This behavior causes valid configurations to fail and appears to contradict the intended logic in the specification.

      Is this issue urgent?

      Tests should be implemented soon so that other drivers can catch a potential problem before the users do.

      Is this ticket required by a downstream team?

      No

      Is this ticket only for tests?

      Yes

      Acceptance Criteria

      • Add new tests to confirm that when the SRV hostname has three or more dot-separated parts, it is valid for the returned hostnames to be identical and an error is not thrown.
        • mongodb+srv://a.b.com is valid and SRV returns a.b.com
        • mongodb+srv://a.b.c.com is valid and SRV returns a.b.c.com

            Assignee:
            alex.clark@mongodb.com Alex Clark
            Reporter:
            alex.clark@mongodb.com Alex Clark
            Shane Harvey Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: