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

DB.prototype.copyDatabase() doesn't inherit session when using SCRAM-SHA-1

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • Labels:
    • Sharding
    • ALL

      DB.prototype.copyDatabase() calls through to Mongo.prototype.copyDatabaseWithSCRAM() when the authentication mechanism is configured to be "SCRAM-SHA-1". The Mongo.prototype.copyDatabaseWithSCRAM() function is implemented in C++ and doesn't use the DriverSession underlying the DB object.

      // Use the copyDatabase native helper for SCRAM-SHA-1
      if (mechanism == "SCRAM-SHA-1") {
          return this.getMongo().copyDatabaseWithSCRAM(
              fromdb, todb, fromhost, username, password, slaveOk);
      }
      

      Note: This issue was found via manual code inspection of all usages of DB.prototype.getMongo() during SERVER-30686.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: