[DRIVERS-2668] Add SRV test with capital letters in hostnames Created: 05/Jul/23  Updated: 21/Nov/23

Status: Implementing
Project: Drivers
Component/s: Initial DNS Seedlist Discovery
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Shane Harvey Assignee: Shane Harvey
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Issue split
split to CDRIVER-4675 Add SRV test with capital letters in ... Backlog
split to CSHARP-4712 Add SRV test with capital letters in ... Backlog
split to CXX-2709 Add SRV test with capital letters in ... Backlog
split to RUBY-3289 Add SRV test with capital letters in ... Backlog
split to RUST-1697 Add SRV test with capital letters in ... Backlog
split to JAVA-5064 Add SRV test with capital letters in ... Backlog
split to GODRIVER-2897 Add SRV test with capital letters in ... Closed
split to MOTOR-1148 Add SRV test with capital letters in ... Closed
split to PHPLIB-1186 Add SRV test with capital letters in ... Closed
split to PYTHON-3822 Add SRV test with capital letters in ... Closed
split to NODE-5439 Add SRV test with capital letters in ... Scheduled
Related
related to PYTHON-3800 An error occurs when the SRV record c... Closed
Driver Changes: Needed
Downstream Changes Summary:

Summary of necessary driver changes
Drivers should sync the initial-dns-seedlist-discovery spec test added in: https://github.com/mongodb/specifications/commit/82da02ba96d5d3ec4f48f6d2d4f2d0ebb1dce241

Case:
Engineering Lead: Shane Harvey Shane Harvey
Start date:
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4675 Backlog
CXX-2709 Backlog
CSHARP-4712 Backlog
GODRIVER-2897 Fixed 1.14.0
JAVA-5064 Backlog
NODE-5439 Scheduled
MOTOR-1148 Duplicate
PYTHON-3822 Fixed 4.7
PHPLIB-1186 Won't Do
RUBY-3289 Backlog
RUST-1697 Backlog

 Description   

New Summary

This ticket adds a new initial-dns-seedlist-discovery spec test to ensure drivers can connect with a "mongodb+srv://" URI that contains capital letters in the SRV hostname: https://github.com/mongodb/specifications/commit/82da02ba96d5d3ec4f48f6d2d4f2d0ebb1dce241

Although this test does not cover the bug in PYTHON-3800, it's still useful because it ensures drivers normalize the hostname before SRV+TXT lookup.

Original Summary

In HELP-47526 and PYTHON-3800, a bug was discovered where pymongo failed to connect to SRV hosts with capital letters. Specifically, in this section of the spec:

A driver MUST verify that the host names returned through SRV records have the same parent {domainname}. Drivers MUST raise an error and MUST NOT initiate a connection to any returned host name which does not share the same {domainname}.

The bug was that pymongo would normalize the {domainname} to lowercase but would not normalize the host names returned through SRV records.

The test should use a new SRV record that resolves to a host with capital letters:

 
Record                                      TTL    Class   Port   Target
_mongodb._tcp.test25.test.build.10gen.cc.   86400  IN SRV  27017  localhost.TEST.build.10gen.cc.

Then test that discovery works when connecting to both of the following URIs:

mongodb+srv://test25.test.build.10gen.cc
mongodb+srv://test25.TEST.build.10gen.cc



 Comments   
Comment by Githook User [ 21/Nov/23 ]

Author:

{'name': 'Shane Harvey', 'email': 'shnhrv@gmail.com', 'username': 'ShaneHarvey'}

Message: DRIVERS-2668 Add SRV test with uppercase hostname (#1473)
Branch: master
https://github.com/mongodb/specifications/commit/82da02ba96d5d3ec4f48f6d2d4f2d0ebb1dce241

Comment by Shane Harvey [ 07/Nov/23 ]

PR: https://github.com/mongodb/specifications/pull/1473

Comment by Shane Harvey [ 11/Jul/23 ]

BUILD-17706 will add the required SRV record to unblock testing.

Generated at Thu Feb 08 08:26:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.