Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2192

Clarify hostname canonicalization logic.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.11
    • Component/s: Authentication
    • Security Level: Public
    • Labels:
      None

      Description

      Currently, the canonicalization logic for some host addresses gets different results in java and python (the current c# version has the same results as python, but the ticket is still not finished).

      To check it, I used python code which is provided in the description of spec ticket: SPEC-1040 and the following java code:

      InetAddress.getByName(serverAddress.getHost()).getCanonicalHostName()
      

      from https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/internal/connection/GSSAPIAuthenticator.java#L98

      See, this google doc with the results: https://docs.google.com/document/d/145oeuIYo-2OMmZC8P68LaPI_RfSuaQw3buC_yKB9qb0.
      In two words, the canonicalization logic for the host azure.microsoft.com returns different results for java and python:

      • Python result: l-0007.l-msedge.net
      • Java result: 13.107.42.16

      The target of this ticket is to determine which result is correct/expected. Also, it would be great to add more test hostnames to check this behavior.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              behackett Bernie Hackett
              Reporter:
              dmitry.lukyanov Dmitry Lukyanov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: