-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.1
-
Component/s: GridFS
-
Environment:.NET
-
Fully Compatible
In our application we have some security restrictions for user which uses GridFS.
User granted actions are: "insert", "remove", "update", "find".
We don't want to grant database management actions, such as "createIndex", to application user.
In our situation OpenUploadStream method in GridFSBucket class try to create index for GridFS collection (because collection is empty) and fails with MongoCommandException "not authorized on DBNAME to execute command { createIndexes: "COLLECTIONNAME.files"...".
I can send pull request with checking if index already exists to avoid index creation.
But it is fundamentally wrong to do DBA's work from driver.
DBA should create all necessary indexes from deployment script.
- is duplicated by
-
CSHARP-1788 Manage Index on GridFS
- Closed