OIDC re-authentication fails with promoteValues: false

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 2
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

        1. Expected behaviour

      391 - Reauthenticate is handled within the driver by reauthenticating the user.

      ## 

      391 - Reauthenticate error is thrown sometimes. We see this error in Compass, as reported by https://jira.mongodb.org/browse/HELP-83883.

      We were also able to reproduce this error with a 8.2-enterprise mongo server and a simple oidc flow.

      Digging a bit deeper, the problem is caused by the error code sometimes being an Int32 instead of a primitive value. 

      This goes against MongoError type definition, which uses primitive types (string | number | undefined for code ).
      And it lead to this check failing to catch the 391 as intended:
      node-mongodb-native/src/sdam/server.ts

      Line 359 in 2512137

      operationError.code === MONGODB_ERROR_CODES.Reauthenticate

      .

            Assignee:
            Durran Jordan
            Reporter:
            Paula Stachova
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: