[DRIVERS-2057] Determine how drivers should handle trailing dots in SRV results Created: 27/Mar/19 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | Drivers |
| Component/s: | Initial DNS Seedlist Discovery |
| Fix Version/s: | None |
| Type: | Spec Change | Priority: | Major - P3 |
| Reporter: | Jeremy Mikola | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Driver Changes: | Needed | ||||||||||||||||||||||||||||
| Description |
|
Per SPEC-1264, drivers will test that trailing dots are permitted in host names. As this relates to initial DNS seedlist discovery, we should permit trailing dots in SRV results but must also decide how, if at all, trailing dots factor in to matching domain suffixes between the original service (host is URI string) and SRV results. In |
| Comments |
| Comment by ADAM Martin (Inactive) [ 28/Mar/19 ] |
|
Spencer's assessment appears to be correct. |
| Comment by Spencer Jackson [ 28/Mar/19 ] |
|
1) All SRV results are fully qualified. SRV results implicitly have a dot at the end. Drivers probably should be able to accept dots at the end of connection string hosts. CC adam.martin who implemented this in the shell, and has feelings about DNS RFCs. Does this response sound right? |
| Comment by Jeremy Mikola [ 28/Mar/19 ] |
|
oleg.pudeyev: Thanks for the link. This definitely seems related to this issue, as well as SPEC-1264 (for general connection string parsing). spencer.jackson: Can you chime in on this issue and answer a few outstanding questions?
|
| Comment by Oleg Pudeyev (Inactive) [ 28/Mar/19 ] |
|
jmikola There is also https://jira.mongodb.org/browse/SPEC-1228?filter=25987 which may be relevant to the work here. |
| Comment by Jeremy Mikola [ 28/Mar/19 ] |
|
If we ensure that drivers allow a trailing dot in host names, this will likely require some changes to the current logic for enforcing a common suffix between the service host name and SRV results. In the case of libmongoc, which doesn't yet permit trailing dots ( Therefore, drivers may need to alter their suffix extraction logic to account for the optional trailing dot. With that addressed, I think the following logic would apply:
|