• Type: Bug
    • Resolution: Fixed
    • Priority: Critical - P2
    • 2.9.3
    • Affects Version/s: 1.17.6, 2.9.2
    • Component/s: Authentication
    • None
    • Go Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Detailed steps to reproduce the problem?

      getMore and killCursor do not reauthenticated on ReauthenticationRequired (391)

      Repro: https://github.com/10gen/go-driver-tools/blob/main/preston/repros/2.9.2/godriver_4187_test.go
      Public repro: https://gist.github.com/prestonvasquez/a7020ec7c7271f96e7195ab13517b8bc

      Definition of done: what must be done to consider the task complete?

      The auth spec says:

      On any operation that requires authentication, the server may raise the error ReauthenticationRequired (391), typically if the user's credential has expired. Drivers MUST immediately attempt a reauthentication on the connection using suitable credentials, as specified by the particular authentication mechanism when this error is raised, and then re-attempt the operation. This attempt MUST be irrespective of whether the operation is considered retryable.

      So getMore and killCursor must retry if they fail due to ReauthenticationRequired (391) while iterating over a cursor. Authenticator must be passed to the operation layer.

      The exact Go version used, with patch level:

      NA

      The exact version of the Go driver used:

      2.9.2

      Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.

      NA

      The operating system and version (e.g. Windows 7, OSX 10.8, ...)

      NA

      Security Vulnerabilities

      NA

            Assignee:
            Preston Vasquez
            Reporter:
            Stefan Martinov (EXT)
            Qingyang Hu
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: