Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6834

Flaky: x509 auth when a valid cert is provided but the certificate does not correspond to a user fails to authenticate [4]

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 6.16.0
    • Affects Version/s: None
    • Component/s: Flaky Test
    • 3
    • Not Needed
    • None
    • Not Needed
    • 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

      CI: https://spruce.mongodb.com/task/mongo_node_driver_next_rhel80_large_Node22_test_x509_authentication_210720094d15bf72a07ba09e9957a8d9b8d81d80_25_03_05_17_16_30/logs?execution=0&sortBy=STATUS&sortDir=ASC

         1) x509 Authentication
              when a valid cert is provided but the certificate does not correspond to a user
                fails to authenticate:
            AssertionError: expected null to be an instance of MongoServerError
             at Context.<anonymous> (test/manual/x509_auth.test.ts:67:29)
             at processTicksAndRejections (node:internal/process/task_queues:105:5)
      

      Notes for whoever picks this up

      I spent a bit of time investigating this particular flake. I could not reproduce locally on a replica set, but I could reproduce locally on a sharded cluster. The tests are unusual - they configure the cluster with no authentication, then create / remove users in before and after hooks per test ( as needed ).

      My suspicion is that this is some sort of replication lag issue - the test failure occurs because we shouldn't be able to connect, but are successfully authenticating. This test also runs after the valid auth tests, which have created a valid user.

      It is probably worth trying to see if we can reproduce this issue with a different auth mechanism and maybe reporting this to the server, but I think that this is unlikely to be an issue in practice because creating / deleting the same user repeatedly is an unusual workflow and likely doesn't exist in the wild.

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: