Skip to content

Commit

Permalink
requested changes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
aditi-khare-mongoDB committed Sep 4, 2024
1 parent ff800b4 commit b26afc2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ A driver MUST verify that the host names returned through SRV records end with t
Drivers MUST raise an error and MUST NOT initiate a connection to any returned host name which does not share the same
`{domainname}`.

In the case that the SRV record has less than three `.` separated parts, the returned address MUST must end with the
SRV's entire `{hostname}` and MUST NOT be identical to the original `{hostname}`. The next major version MUST no longer
allow an SRV record, with any number of parts, to return address that doesn't end with the SRVs' entire `{hostname}`.
Drivers MUST document this in a prior minor release.
In the case that the SRV record has less than three `.` separated parts, the returned address MUST end with the SRV's
entire `{hostname}` and MUST NOT be identical to the original `{hostname}`. The next major version MUST no longer allow
an SRV record, with any number of parts, to return address that doesn't end with the SRVs' entire `{hostname}`. Drivers
MUST document this in a prior minor release.

The driver MUST NOT attempt to connect to any hosts until the DNS query has returned its results.

Expand Down
26 changes: 11 additions & 15 deletions source/initial-dns-seedlist-discovery/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,25 @@ Seedlist Discovery spec.
For the following prose tests, it is assumed drivers are be able to stub DNS results to easily test invalid DNS
resolution results.

1. When given the following valid SRVs, the pre-DNS SRV validation step not cause any errors.
#### 1. When given the following valid SRVs, the pre-DNS SRV validation step not cause any errors.

a. Only one domain level: `mongodb+srv://localhost`.
a. Only one domain level: `mongodb+srv://localhost`.

b. Only two domain levels: `mongodb+srv://mongo.local`.
b. Only two domain levels: `mongodb+srv://mongo.local`.

<br />
#### 2. For the following steps, run each of these cases: SRVs with one, two, and three `.` separated parts.

2. For the following steps, run each of these cases: SRVs with one, two, and three `.` separated parts.
When given an SRV that does NOT end with the original SRV's domain name, throw a runtime error.

When given an SRV that does NOT end with the original SRV's domain name, throw a runtime error.
For example, the SRV `mongodb+srv://blogs.mongodb.com` resolving to `blogs.evil.com` should prompt an error, since the
returned address does not end with `mongodb.com`.

For example, the SRV `mongodb+srv://blogs.mongodb.com` resolving to `blogs.evil.com` should prompt an error, since
the returned address does not end with `mongodb.com`.
#### 3. For the following steps, run each of these cases: SRVs with one, and two `.` separated parts.

<br />
When given an SRV that returns identical address to the original hostname, throw a runtime error.

3. For the following steps, run each of these cases: SRVs with one, and two `.` separated parts.

When given an SRV that returns identical address to the original hostname, throw a runtime error.

For example, the SRV `mongodb+srv://mongo.local` resolving to `mongo.local` should prompt an error since it is
identical to the original hostname.
For example, the SRV `mongodb+srv://mongo.local` resolving to `mongo.local` should prompt an error since it is identical
to the original hostname.

## Test Setup

Expand Down

0 comments on commit b26afc2

Please sign in to comment.