[SERVER-7864] Make copyDB, cloneDB, etc. work with auth when using old-style users Created: 06/Dec/12  Updated: 07/Apr/23  Resolved: 17/Jan/13

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 2.3.2
Fix Version/s: 2.4.0-rc0

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 1
Labels: triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-8213 Make copyDB and clone work with auth ... Closed
is related to SERVER-8221 Using copyDatabase to copy from an un... Closed
is related to SERVER-9093 Make copydb command work with auth on... Closed
Operating System: ALL
Participants:

 Description   

cloneCollection, clone, and copyDatabase no longer work with authentication enabled. Even though we can't currently support them with auth using the new-style users added in 2.3.2, they should still work for the old-style users, for backwards compatibility.



 Comments   
Comment by Spencer Brody (Inactive) [ 06/Sep/13 ]

The best workaround at the moment is probably to use mongodump/mongorestore.

Comment by Rajiv Kumar [ 06/Sep/13 ]

Is there an alternative if I want to copy database with auth enabled? Copying collections will be slow and error prone.

Comment by auto [ 18/Mar/13 ]

Author:

{u'date': u'2013-03-15T21:15:27Z', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: SERVER-8280 SERVER-7864 Make copydb command work without username/password when dest machine has auth but source does not
Branch: master
https://github.com/mongodb/mongo/commit/42676483093ae14b1f9f4a25190f0e00edcd020c

Comment by auto [ 17/Jan/13 ]

Author:

{u'date': u'2013-01-16T19:13:13Z', u'email': u'spencer@10gen.com', u'name': u'Spencer T Brody'}

Message: SERVER-7864 Make copyDB, clone, and cloneCollection work with auth.

copyDB and clone can only be run when auth is enabled if the client is
authenticated as an old-style user. New style users using the extended form
privilege documents cannon run copyDB or clone when auth is enabled. They can
still run cloneCollection (against the target instance), so long as the source
instance doesn't have auth on.
Branch: master
https://github.com/mongodb/mongo/commit/4c228117925e19ff8c127447d3ce42454709c025

Comment by auto [ 14/Dec/12 ]

Author:

{u'date': u'2012-12-14T15:44:09Z', u'email': u'spencer@10gen.com', u'name': u'Spencer T Brody'}

Message: SERVER-7864 Skip jstests/copydb when running tests with auth
Branch: master
https://github.com/mongodb/mongo/commit/c8884bd57498000735a5e30af55479d83e8f3634

Comment by auto [ 06/Dec/12 ]

Author:

{u'date': u'2012-12-06T19:47:29Z', u'email': u'spencer@10gen.com', u'name': u'Spencer T Brody'}

Message: SERVER-7864 Disable jstests/auth/copyauth.js test as copyDatabase no longer works with auth
Branch: master
https://github.com/mongodb/mongo/commit/b22177be9391b810518c3f0ca58ae4db92329d9b

Generated at Thu Feb 08 03:15:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.