[SERVER-30886] DB.prototype.copyDatabase() doesn't inherit session when using SCRAM-SHA-1 Created: 30/Aug/17  Updated: 08/Jan/24  Resolved: 10/Aug/18

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Gone away Votes: 0
Labels: todo_in_code
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-43462 Remove cloneDatabase and copyDatabase... Closed
is related to SERVER-30686 Integrate retryWrites into mongo shel... Closed
Assigned Teams:
Sharding
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Maria van Keulen [ 10/Aug/18 ]

Closing since the copyDB command was removed as of SERVER-36257.

Comment by Gregory McKeon (Inactive) [ 19/Mar/18 ]

Sending to sharding because it's sessions related.

Generated at Thu Feb 08 04:25:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.