[SERVER-83190] Misleading error message when trying to rename an encrypted collection Created: 08/Nov/23  Updated: 30/Nov/23

Status: Needs Verification
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Edward Fu Assignee: Noopur Gupta
Resolution: Unresolved Votes: 0
Labels: external-user
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

What problem are you facing?

When trying to rename a encrypted collection using a user with readWriteAnyDatabase access, a misleading "MongoServerError: Cannot rename an encrypted collection IllegalOperation" is shown. Error disappears and renaming succeeds when the user has atlasAdmin role.

 

Failed to overwrite the warehouse, reason: MongoServerError: Cannot rename an encrypted collection at CryptoConnection.onMessage (/app/node_modules/mongodb/lib/cmap/connection.js:202:26) at MessageStream.<anonymous> (/app/node_modules/mongodb/lib/cmap/connection.js:61:60) at MessageStream.emit (node:events:514:28) at processIncomingData (/app/node_modules/mongodb/lib/cmap/message_stream.js:124:16) at MessageStream._write (/app/node_modules/mongodb/lib/cmap/message_stream.js:33:9) at writeOrBuffer (node:internal/streams/writable:447:12) at _write (node:internal/streams/writable:389:10) at Writable.write (node:internal/streams/writable:393:10) at TLSSocket.ondata (node:internal/streams/readable:817:22) at TLSSocket.emit (node:events:514:28) {

What driver and relevant dependency versions are you using?

 
"mongodb": "^6.0.0",
"mongodb-client-encryption": "^6.0.0",

Steps to reproduce?



 Comments   
Comment by PM Bot [ 08/Nov/23 ]

Hi edward.fu@terminal3.io, thank you for submitting this ticket! The team is going to investigate and reply back with more info after the investigation is completed.

Generated at Thu Feb 08 06:51:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.