MongoDBのユーザを作成する時ロールを付与するだけでなく、細かくユーザ権限を指定して付与することも可能。
ユーザ権限について纏めたのでメモ
Query and Write Actions
ドキュメント操作についての権限
- find
- insert
- remove
- update
Database Management Actions
DB管理用権限
- changeCustomData
- changeOwnCustomData
- changeOwnPassword
- changePassword
- createCollection
- createIndex
- createRole
- createUser
- dropCollection
- dropRole
- dropUser
- emptycapped
- enableProfiler
- grantRole
- killCursors
- revokeRole
- unlock
- viewRole
- viewUser
Deployment Management Actions
DB管理・操作用権限
- authSchemaUpgrade
- cleanupOrphaned
- cpuProfile
- inprog
- invalidateUserCache
- killop
- planCacheRead
- planCacheWrite
- storageDetails
Replication Actions
レプリケーション管理・操作用権限
- appendOplogNote
- replSetConfigure
- replSetGetStatus
- replSetHeartbeat
- replSetStateChange
- resync
Sharding Actions
シャード管理・操作用権限
- addShard
- enableSharding
- flushRouterConfig
- getShardMap
- getShardVersion
- listShards
- moveChunk
- removeShard
- shardingState
- splitChunk
- splitVector
Server Administration Actions
システム管理用権限
- applicationMessage
- closeAllDatabases
- collMod
- compact
- connPoolSync
- convertToCapped
- dropDatabase
- dropIndex
- fsync
- getParameter
- hostInfo
- logRotate
- reIndex
- renameCollectionSameDB
- repairDatabase
- setParameter
- shutdown
- touch
Diagnostic Actions
システム調査用権限
- collStats
- connPoolStats
- cursorInfo
- dbHash
- dbStats
- diagLogging
- getCmdLineOpts
- getLog
- indexStats
- listDatabases
- listCollections
- listIndexes
- netstat
- serverStatus
- validate
- top
Internal Actions
MongoDB内部用権限(余程のことがない限りは使用しないほうがよさそう)
- anyAction
- internal
※参考