Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48715

Sending cluster time to an arbiter with auth enabled results in an error

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Sharding 2020-06-29
    • 25

      Commands including a $clusterTime sent to an arbiter result in an error when auth is enabled on the server.

      I reproduced locally by creating a three node (PSA) replica set with auth enabled using mlaunch:

      mlaunch init --replicaset --arbiter --nodes=2 --auth --username user --password password --name replicaSet --setParameter enableTestCommands=1 --verbose --dir repro
      

      The error can be reproduced by sending a command to the arbiter with a $clusterTime obtained from another node. Example with the shell:

      var cmd = {
        "isMaster": 1,
        "$clusterTime" : {
          "clusterTime" : Timestamp(1591812742, 1),
          "signature" : {
              "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
              "keyId" : NumberLong(0)
          }
        }
      }
      
      db.runCommand(cmd)
      

      Replies with:

      {
      	"ok" : 0,
      	"errmsg" : "aborting keys cache refresh because node is shutting down",
      	"code" : 91,
      	"codeName" : "ShutdownInProgress"
      }
      

      Interestingly, this occurs without authenticating the connection, but I cannot reproduce this if the server is started without auth enabled.

      Behavior appears in server version 4.5.0-1606-gbd74e90, but not 4.5.0-1602-g5c6e1e5.

      The most relevant looking server commit is 7074dee1fbf6763c0d463c377c2e47d8ef2c4f6f.

      This originally appeared as a C driver test failure in CDRIVER-3708.

            Assignee:
            kevin.pulo@mongodb.com Kevin Pulo
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: