create roles with rights on wildcard database like collections
Exemple:
use admin
db.createRole(
{
role: "UserCanCreateDbTest",
privileges: [
{ resource: { db: "test", collection: "" }, actions: [ "update", "insert", "remove" ] },
{ resource: { db: "test", collection: "" }, actions: [ "find" ] }
],
roles: [
{ role: "read", db: "admin" }
]
},
{ w: "majority" , wtimeout: 5000 }
)
https://stackoverflow.com/questions/30462767/mongodb-grant-all-with-wildcard-role-like-mysql
1
vote
Teddy
shared this idea