Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2254

Could not authenticate using kerberos authentication with mongoc-driver v1.5.0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0
    • Affects Version/s: 1.2.4
    • Component/s: auth
    • Labels:
      None

      Based on https://jira.mongodb.org/browse/CDRIVER-323, the canonicalizeHostName flag is being passed in the uri string during kerberos authentication. When using the mongo-c-driver v1.5.0 with kerberos authetication, the driver hangs when using canonicalizeHostName=true. Precisely, the hang takes places inside the _mongoc_cluster_get_canonicalized_name function. This hang was not observed when using the mongo-c-driver v1.1.10. Not sure if this is the cause but the implementation of mongoc_stream_get_base_stream function (called within _mongoc_cluster_get_canonicalized_name) has changed since the 1.1.10 version.

      If the flag (canonicalizeHostName) is not set at all, then the kerberos authentication mechanism works for the mongo-c-driver v1.5.0. Is using the flag a requirement?

      The testing was performed with the following setup:

      MongoDB server version: 3.4.4 (enterprise)
      MongoDB server installed on: Centos 7

      MongoDB Client on: Centos7 (tested on Windows 7 as well)
      Mongo-c-driver version: 1.5.0

      In case it is helpful, the format of the connection string being used when using canonicalizedHostName is:

      mongodb://example%20TEST.COM@mongocdriver:27017/test?authMechanism=GSSAPI&gssapiServiceName=mongodb&canonicalizeHostname=true&connectTimeoutMS=1213&serverSelectionTimeoutMS=1234&socketTimeoutMS=123321

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            nachiketg Nachiket Goswami
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: