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

server_info() doesn't work without authentication

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.1
    • Component/s: Auth
    • None
    • Environment:
      Ubuntu Bionic

      Creating a MongoClient without authentication, and executing client.server_info() results in

       OperationFailure: there are no users authenticated

      Strangely, executing buildinfo: 1 in the mongo shell works without authentication.

      The difference between the two calls at the server side:

      PyMongo call:

       {{2018-04-19T11:09:05.663+0000 D COMMAND [conn42] assertion while executing command 'buildinfo' on database 'admin' with arguments '{ buildinfo: 1, lsid:

      { id: UUID("4da14329-8129-4396-a9d4-0bd437edc491") }

      , $clusterTime: { clusterTime: Timestamp(1524136141, 1), signature:

      { keyId: 6546081529825591297, hash: BinData(0, 080455570CE489C46F29666BD3F30579B805AFD3) }

      }, $readPreference: { mode: "secondaryPreferred" }, $db: "admin" }' and operationTime '{ ts: Timestamp(1524136141, 1) }': Unauthorized: there are no users authenticated}}{{}}

      From Mongo Shell: the same, but no readPreference tag there.

      {{}}

      This worked in previous PyMongo/MongoDB versions.

      There are Ansible bugs logged because of this:

      https://github.com/ansible/ansible/issues/38998

      https://github.com/ansible/ansible/issues/34153

      {{}}

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            gyurco Gyorgy Szombathelyi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: