[SERVER-579] db.copyDatabase should allow you to copy from a server that requires authentication Created: 27/Jan/10  Updated: 12/Jul/16  Resolved: 16/Feb/10

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

Type: Improvement Priority: Minor - P4
Reporter: Matt Hooks Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

n/a


Participants:

 Description   

Currently db.copyDatabase allows you to specify a host to copy from, but does not allow any options on this host other than port. It would be nice if we could also specify a username and password for hosts that require authentication.



 Comments   
Comment by Aaron Staple [ 16/Feb/10 ]

Should be implemented now. The copyDatabase header is now:

DB.prototype.copyDatabase = function(fromdb, todb, fromhost, username, password)

You could potentially run into trouble if you try to copy the admin database and have security turned on in the target, but I don't expect you'll want to do that. Reopen the bug and let me know if I'm wrong, though.

Comment by auto [ 16/Feb/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-579 when target is running with security as well
http://github.com/mongodb/mongo/commit/b92ecb5690780c0b32ad05a0089c8e54ec01af1b

Comment by auto [ 16/Feb/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-579 support copyDatabase from source running with security
http://github.com/mongodb/mongo/commit/7ed81cdf6bc3af668273983c8dd890e545bcdaa4

Comment by Eliot Horowitz (Inactive) [ 02/Feb/10 ]

yes - that makes sense.

Comment by Aaron Staple [ 02/Feb/10 ]

I imagine we don't want to send the pw in the clear. Would it make sense to have two commands – the first command to get a nonce from the source db via the target db and the second command to supply a hashed pw and request the copy?

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