[SERVER-5955] Forbid renaming system collections Created: 29/May/12  Updated: 13/Jan/23  Resolved: 13/Jan/23

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

Type: Improvement Priority: Major - P3
Reporter: Roman Kuzmin Assignee: Backlog - Security Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-31216 Mark internal collections in metadata... Closed
Duplicate
duplicates SERVER-48513 User collections can be renamed to a ... Closed
is duplicated by SERVER-48513 User collections can be renamed to a ... Closed
Related
related to SERVER-5972 Cannot drop system.js collection Closed
Assigned Teams:
Server Security
Participants:
Linked BF Score: 0

 Description   

I am using the official C# driver v1.4.2. I noticed that I cannot remove the system collection `system.indexes` from my database (this is rather expected) but I can rename this collection (this is rather unexpected).

> db.system.indexes.renameCollection("old_indexes")
{ "ok" : 1 }
> show collections
old_indexes

Discussion: https://groups.google.com/forum/#!topic/mongodb-user/C0AksmnNVdY

I've been recommended to submit the issue, so do I.



 Comments   
Comment by Samantha Ritter (Inactive) [ 21/Jul/17 ]

This issue is not a duplicate of SERVER-15616 or SERVER-15596. Those tickets only implemented a solution for the `system.indexes` collection, not for system collections in general. I am re-opening this ticket so we can discuss possible general solutions for other systems collections.

Comment by Roman Kuzmin [ 17/Nov/13 ]

On the other hand, ability to rename a system collection provides a way to drop a system collection, for example, not needed empty "system.js" which currently cannot be dropped directly, see https://jira.mongodb.org/browse/SERVER-5972

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