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

Clarify hostname canonicalization logic.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.11
    • Affects Version/s: None
    • Component/s: Auth
    • None

      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.

       

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: