[SERVER-23151] Make copyDatabase work with all authentication mechanisms Created: 15/Mar/16  Updated: 01/Feb/18  Resolved: 16/Mar/16

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

Type: Improvement Priority: Major - P3
Reporter: Marius Bogdanescu Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-13118 Make copydb capable of using all auth... Closed
Participants:

 Description   

Currently there is an assert:
assert(mechanism == "SCRAM-SHA-1" || mechanism == "MONGODB-CR");

I am using PLAIN authentication mechanism and I want to copy a database in the same mongo instance.

I get the error:
assert failed

doassert@src/mongo/shell/assert.js:15:14
assert@src/mongo/shell/assert.js:31:5
DB.prototype.copyDatabase@src/mongo/shell/db.js:380:5
@(shell):1:1
 
2016-03-15T16:10:48.641+0000 E QUERY    [thread1] Error: assert failed :
doassert@src/mongo/shell/assert.js:15:14
assert@src/mongo/shell/assert.js:31:5
DB.prototype.copyDatabase@src/mongo/shell/db.js:380:5
@(shell):1:1



 Comments   
Comment by Andreas Nilsson [ 16/Mar/16 ]

Thanks for your question marius.bogdanescu@gmail.com. If you only need to copy a database locally on the same MongoDB instance you don't need to authenticate to any remote server. Any available authentication mechanism can be used to authenticate the client issuing the copyDatabase command.

If you need to copy from one MongoDB instance to another the destination server needs to authenticate to the source server. Currently we only support MONGODB-CR or SCRAM to perform that authentication step.

See existing feature request: SERVER-13118. I will close this request as a duplicate of that ticket.

Let me know if you have additional questions.

Kind regards,
Andreas Nilsson

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